$a^{12} \equiv 1 \pmod{35}$,knowing that $(a,35)=1$ Prove that $\forall a \text{ with } (a,35)=1:$
$$a^{12} \equiv 1 \pmod{35}$$
$$35 \mid a^{12}-1 \Leftrightarrow 5 \cdot 7 \mid a^{12}-1 \overset{(5,7=1)}{ \Leftrightarrow} 5 \mid a^{12}-1 \text{ and } 7 \mid a^{12}-1$$
Therefore, $\displaystyle{ a^{12} \equiv 1 \pmod{35} \Leftrightarrow a^{12} \equiv 1 \pmod 5, a^{12} \equiv 1 \pmod 7}$
$$(a,35=1) \Rightarrow (a, 5 \cdot 7)=1 \overset{(5,7)=1}{\Rightarrow } (a,5)=1 \text{ and } (a,7)=1$$
According to Fermat's theorem:
$$a^4 \equiv 1 \pmod 5$$
$$a^{12} \equiv (a^4)^3 \equiv 1 \pmod 5$$
Also:
$$a^6 \equiv 1 \pmod 7$$
$$a^{12} \equiv (a^6)^2 \equiv 1 \pmod 7$$
So,we conclude that:
$$a^{12} \equiv 1 \pmod{35}$$
Could you tell me if it is right?

Hint $\ $ If $\,a\,$ is coprime to primes $\,p_1\!\ne p_2\,$ and $\,\color{#0a0}{p_i\!-1\mid n}\,$ then by  $\rm\color{#c00}{little\ Fermat}$
$\qquad\qquad\qquad {\rm mod}\ p_i\!:\,\ a^n\equiv (\color{#c00}{a^{\,\large p_i-1}})^{\Large\color{#0a0}{\frac{n}{p_i-1}}\!}\equiv \color{#c00}1^{\Large\color{#0a0}{\frac{n}{p_i-1}}}\equiv 1\,\Rightarrow\, p_i\mid a^n-1\,\Rightarrow\, p_1 p_2\mid a^n-1$
