Mittelwertsatz
From Lagrange's theorem, the order of must divide both and , the orders of and respectively. The only two positive integers that divide both and are and . So or .