Master Delegator
At the highest level of AUCPL inc, what matters isn't technical skill or knowledge, but how well you can divide responsibility, creating the illusion of productivity and shifting blame to your underlings when things go wrong. Recently, the CFO Shaun got fired for gambling the company budget, and the new CFO will be selected between you and your arch-nemesis, Tung.
To decide if you or Tung will be promoted, the CEO has proposed you play a game of delegation battle. This game works as follows: there is an initial integer workload amount . You go first, and you and Tung take turns delegating work until someone cannot make a turn. Delegate or die, as they say.
To make a turn, you must pick a prime number and a positive integer
such that
divides
with no remainder, and replace
with
(a smaller positive integer). This represents delegating work to your prime underlings. Given that you go first and whoever is first unable to make a move loses, can you calculate whether you will win and be promoted, or if Tung will be victorious instead?
Input
The first line contains a single integer (
), the initial workload amount.
Output
If you can always win (you always take the first turn), output Yes. Otherwise, output No.
Example
Input 1
13
Output 1
Yes
Clearly, you can instantly win here by selecting and
, thus replacing
with
. At this point, Tung is unable to move, as
has no prime divisors.
Input 2
18
Output 2
Yes
Here you can replace with
by selecting
. At this point, whether Tung divides by
or
you will win regardless by reducing
to
, so Tung will be unable to make his next turn. This is the only way to win in this case.
Input 3
35
Output 3
No
Input 4
504
Output 4
No
Comments