If $a$ and $b$ are not divisible by prime $p$, prove that if $a^p \equiv b^p \pmod p$, then $a \equiv b \pmod p$
I know the answer is related to Fermat's Little Theorem. If $a^{p-1} \equiv 1 \pmod p$, then $a^p \equiv a \pmod p$, but I'm not sure how to apply that to both $a$ and $b$ in the original question.