Source: https://coopersnotes.net/docs/numbers/CHAP03 Quadratic Congruences.pdf