Linear equations with inequalities