A characterization of integral elliptic automorphic forms