Source: https://lionelponton.fr/TerminaleSpe/exercices_PGCD_2020_4.pdf