A characterization of monomials