| NUS CS3233 Final Team Contest 2025 |
|---|
| Закончено |
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 \texttt{XOR} 1 \texttt{XOR} 2 \texttt{XOR} 4 \texttt{XOR} \dots \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!
The first line of input contains one integer $$$N$$$ $$$(1 \leq N \lt 2^{30})$$$.
If it is possible for Tomori to win a new card, print YES. Otherwise, print NO.
12
YES
3
NO
| Название |
|---|


