Greatest common divisor of two polynomials