Problem10342--ABC324 —— B - 3-smooth Numbers

10342: ABC324 —— B - 3-smooth Numbers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

You are given a positive integer $N$. If there are integers $x$ and $y$ such that $N=2^x3^y$, print `Yes`; otherwise, print `No`.

Input

The input is given from Standard Input in the following format:

```
$N$
```

Output

Print a single line containing `Yes` if there are integers $x$ and $y$ that satisfy the condition, and `No` otherwise.

Constraints

-   $1\leq N\leq10^{18}$
-   $N$ is an integer.

Sample 1 Input

324

Sample 1 Output

Yes
For $x=2,y=4$, we have $2^x3^y=2^23^4=4×81=324$, so the condition is satisfied. Thus, you should print Yes.

Sample 2 Input

5

Sample 2 Output

No
There are no integers $x$ and $y$ such that $2^x3^y=5$. Thus, you should print No.

Sample 3 Input

32

Sample 3 Output

Yes
For $x=5,y=0$, we have $2^x3^y=32×1=32$, so you should print Yes.

37748736

Yes

Source/Category