If p > a then,

if a and p are coprime then $a^{p-1} = 1 mod p$

If a and p are not coprime then $a^{p-1} = a mod p$

But here not the case

if a and p are coprime then $a^{p-1} = 1 mod p$

If a and p are not coprime then $a^{p-1} = a mod p$

But here not the case