Solving 3 variable systems of equations with no or infinite solutions