Source: http://mathematiques.ac.free.fr/IMG/pdf/Prog_Algo_Euclide_Bezout.pdf