For a positive integer $n$, let $n = p_1^{k_1}p_2^{k_2}\cdots p_m^{k_m},$ where the $p_i$ are distinct primes and each $k_i$ is a positive integer, and define $\gamma(n) := \operatorname{lcm}(\phi(p_1),\cdots, \phi(p_m)),$ where $\phi$ is the Euler totient function, and $\beta(n) = \max(k_1,\cdots, k_m).$ Prove that for all integers $a,b,y$ with $a,b\ge\beta(n)$, $a\equiv b\pmod{\gamma(n)} \implies y^a \equiv y^b \pmod n $.
I think it would be useful to use the Euler Fermat Theorem and Chinese Remainder Theorem, but I'm not sure how. If I can prove that $y^{\beta(n)} \equiv 1 \pmod n$ for any $n \in \mathbb{Z}_{>0}$ and $y$ that's not a multiple of $n$, then the result should follow easily, though I'm not sure whether this is even true. The Chinese remainder theorem states the following: suppose $n_i$ is an integer larger than $1$ for $1\leq i\leq k$ and that the $n_i$ are pairwise coprime, and that $a_i$ is an integer so that $0\leq a_i < n_i$ for $1\leq i\leq k$. Then there is a unique integer $x$ so that $0\leq x < N$ and $x\equiv a_i \pmod{n_i}$ for all $i$.
For the given problem, I initially thought of choosing the $p_i$'s to be the $n_i$'s in the statement of the Chinese Remainder Theorem. I suppose I could instead choose the $p_i^{k_i}$'s. But what should I choose as the $a_i$'s?
The Euler-Fermat theorem states that if $n$ and $a$ are coprime positive integers, then $a^{\phi(n)}\equiv 1\pmod n$, where $\phi$ is the Euler totient function. I know the Euler product formula, which states that for an integer $n$ written in the form of the problem statement, $\phi(n) = n\prod_{p \mid n} (1-\frac{1}p)$, where $p$ ranges over all distinct primes dividing $n$, but I'm not sure if it's useful for solving this problem.