Integrals of motion and analytic functions