Consider a heat engine as shown on the figure. and are heat added to heat bath and heat taken from in one cycle of the engine. W is the mechanical work done on the engine.
If W > 0, then possibilities are:
a)
b)
c)
d)
The answer is the option (a) and (c)
(From above figure)
Thus, if both and are positive.
And if both are negative.
Hence, a and c are correct.