I believe the work input= Fi × di. Work input is work done on a machine equal to the effort force times the distance through which the force is applied. On the other hand the work output is the work that is done by a machine equals resistance force times the distance through which the force is applied.