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