Solver for basic pell equations.