If gcd(a,35) = 1, show that (mod 35)

the hint in the book says remember, by Femat's thm: (mod 7) and (mod 5)

So since gcd(a,5) = 1 and gcd(a,7) = 1, you can apply Fermat's them - and prove the hint

But thats where I'm stuck - is there another theorem I've forgot where you can multiply the exponent and mod???? is it a property I don't remember??

help!