how to solve diophantine equations