Let $M = \{1, 2, \dots , n\}$. What would be necessary and sufficient condition(s) for the number $m$, so that $M$ can be expressed as the disjoint union of $m$ subsets $A_i$, $(i = 1, 2, \dots, m$), such that
(i) each $A_i$ contains the same number of elements, and
(ii) the sum of all elements of $A_i$ is the same for $i = 1, 2, \ldots, m.$
Obviously, $m\mid n$. Other than that, I don't know where to begin!