To solve this problem, we must simply use the concept of Total Energy transferred both in terms of work and heat. This is basically conjugated in the first law of thermodynamics.
If we take the heat absorbed as positive and the expelled as negative we have that the total work done in the heat engine is


For the case of the engine pumps the Energy absorbed is

In this way the ratio between the two would be

So it is reversible, because the state of efficiency of the body is totally efficient.