Determinants of off-farm work and its effect on agricultural input intensity