Source: https://irem.univ-reunion.fr/IMG/pdf/scratch_-_condition.pdf