Solving inequalities with multiple variables