Problem M
Miracles can be Created
Tomori is playing a minigame at a card shop. In the game, there are $N+1$ cards numbered from $0$ to $N$, with each number appearing on exactly one card. The game works as follows: the player chooses one card, and then the shop rewards the player with a card whose number is equal to the bitwise XOR of the numbers on the $N$ cards that were not chosen.
Since Tomori already owns all the cards numbered from $0$ to $N$, she wants to obtain a card with a number greater than $N$ — that is, a card she doesn’t already have.
For example, when $N = 12$, Tomori can choose the card numbered $3$ and she will win the card numbered $0 \mathbin {\texttt{XOR}}1 \mathbin {\texttt{XOR}}2 \mathbin {\texttt{XOR}}4 \mathbin {\texttt{XOR}}\dots \mathbin {\texttt{XOR}}12 = 15$, a card she doesn’t already have.
However, she realizes that for some values of $N$ it is impossible to win such a card. To avoid wasting time and money, she wants to know in advance whether her goal is achievable for a given $N$. Help her determine that!
Input
The first line of input contains one integer $N$ $(1 \leq N < 2^{30})$.
Output
If it is possible for Tomori to win a new card, print YES. Otherwise, print NO.
Sample Input 1 | Sample Output 1 |
---|---|
12 |
YES |
Sample Input 2 | Sample Output 2 |
---|---|
3 |
NO |