(m, n)-Ideal characterizations of certain classes of semigroups