eulers theorem and its application