Source: https://www.math.uwaterloo.ca/~snew/pmath340-2020-S/Notes/Chap2IntegersModuloN.pdf