Source: https://www.imo.universite-paris-saclay.fr/~janon/alg2/ExAlg2.pdf