406552: GYM102439 F Prime or number

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. Prime or numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Most likely you already know what is a prime number. Just in case, we recall that a prime is a positive integer that has exactly two different positive integer divisors. In fact, this definition greatly limits your consciousness, so let's try to give an equivalent definition of prime numbers...

A prime number is such an integer $$$p > 1$$$ that there is no such pair of integers $$$x$$$ and $$$y$$$ that $$$x \times y = p$$$ and $$$1 < x \le y < p$$$. It seems that nothing has changed, but in fact it greatly expands your consciousness. Perhaps, reading this definition, you thought about prime numbers over the multiplication operation. Yes, this is true if we assume that «$$$\times$$$» is a multiplication operation. But what if "$$$\times$$$" is not a multiplication operation, but a bitwise "OR" operation? Can you now determine whether a number $$$n$$$ is prime or not? Let's check it out!

Input

The single line contains a single integer $$$n$$$ — the number you need to check that it is a prime number over the bitwise "OR" operation.

$$$$$$1 \le n \le 10^{18}$$$$$$

Output

In a single line, print "Yes" if the number is a prime over the bitwise "OR" operation, otherwise print "No".

ExamplesInput
2
Output
Yes
Input
42
Output
No
Note

Bitwise OR of two non-negative integers $$$a$$$ and $$$b$$$ is the number $$$c = a\ OR\ b$$$, such that each of its digits in binary notation is $$$1$$$ if and only if at least one of $$$a$$$ or $$$b$$$ have $$$1$$$ in the corresponding position in binary notation.

加入题单

算法标签: