Source: https://www.math.nyu.edu/~hausner/congruence.pdf