The equation given is invalid

In the video it is said that (a^p)%p=a where p is a prime number. let us assume the value of a=5 and p=2 then (5^2)%2=1 which is not equal to a

@yash_jjw
For this condition (a^p)%p=a holds true only if p is prime number given that a<p. If p<a, then it’s modulo is always less than a.