Greatest common divisior of two polynomials