Characterisation of the Algebraic Properties of First Integrals of Scalar Ordinary Differential Equations of Maximal Symmetry