solve the diophantine equation