Source: https://ww2.ac-poitiers.fr/math_sp/IMG/pdf/PGCD_et_Fractions_irreductibles.pdf