CF-55A•Codeforces
Flea travel
Rating: 1200
implementationmath
A flea is sitting at one of the hassocks, arranged in a circle, at the moment. After minute number the flea jumps through hassoсks (clockwise). For example, after the first minute the flea jumps to the neighboring hassock. You should answer: will the flea visit all the hassocks or not. We assume that flea has infinitely much time for this jumping.
Input
The only line contains single integer: — number of hassocks.
Output
Output "YES" if all the hassocks will be visited and "NO" otherwise.
Sample 1
Input
1
Output
YES
Sample 2
Input
3
Output
NO
Discussions & Comments
Share your approach or ask questions about this problem (0)
You must be logged in to comment or start a discussion on this problem.
Log InNo comments yet. Be the first to comment!
Actions
Open on CodeforcesAbout Platform
CO
Codeforces
External Judge
Problem Discussions
0Have questions or want to share your solution approach? Join the discussion.
View / write comments