Problem

Source:

Tags: number theory, relatively prime, modular arithmetic



Let $k$ be a positive integer. Prove that there exists a positive integer $\ell$ with the following property: if $m$ and $n$ are positive integers relatively prime to $\ell$ such that $m^m\equiv n^n \pmod{\ell}$, then $m\equiv n \pmod k$.