Source: https://sig.ias.edu/files/LAC ternary notes.pdf