tedious inequality solving