The first one you need merely prove that so that Fermat's applies. The second one would be nice if this was group theory! Otherwise, note that by the division algorithm we have that for some . So and since with only if we may conclude that . The last one is up to you, son.