Optimal nonlinear income tax and nonlinear pricing: optimality conditions and comparative static properties