Integral invariants in maximally supersymmetric Yang-Mills theories