#P4653. Flea travel
Flea travel
Flea travel
题面翻译
一个虫子位于绕城一圈的片树叶中的一片上,在第分钟,虫子会跳过片树叶并在脚下的树叶上做一个记号。在这里,我们假设虫子的。你的任务是判断该虫子是否将片树叶都做了记号。
输入格式:
只有一行,一个数字,为树叶总数量。
输出格式:
若将片树叶都做了记号,输出。否则,输出。
Translated by @da32s1da
题目描述
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.
输入格式
The only line contains single integer: — number of hassocks.
输出格式
Output "YES" if all the hassocks will be visited and "NO" otherwise.
样例 #1
样例输入 #1
1
样例输出 #1
YES
样例 #2
样例输入 #2
3
样例输出 #2
NO