It is possible for a positive integer n not to be prime and still have the property that a^(n-1) congruent to 1 mod n whenever hcf(a,n) = 1. SHow that 561 is such a positive integer n.

So far i have:

a^560 congruent to 1 mod 561

(a^560)-1 = 561k where k is some integer

I also know that 1 mod 561 is congruent to $\displaystyle a^2a^2a^2.......a^2$ (280 times)

I have no idea what to do now?