Solving Geometry Problems with Polynomials