Let $(G,.)$ be a group and $m,n \in\mathbb Z$ such that $\gcd(m,n)=1$. Assume that $$ \forall a,b \in G, \,a^mb^m=b^ma^m,$$ $$\forall a,b \in G, \, a^nb^n=b^na^n.$$
Then how prove $G$ is an abelian group?
Some context: Some of these commutation relations often imply that $G$ is abelian, for example if $(ab)^i = a^i b^i$ for three consecutive integers $i$ then $G$ is abelian, or if $g^2 = e$ for all $g$ then $G$ is abelian. This looks like another example of this phenomenon, but the same techniques do not apply.