#P1505D. Xenolith? Hippodrome?

    ID: 2345 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 6 Uploaded By: Tags>*special problemnumber theory*1800

Xenolith? Hippodrome?

Description

The input contains two integers $N$, $M$ ($1 \le N \le 1024, 2 \le M \le 16$), separated by a single space.

Output "YES" or "NO".

Input

The input contains two integers $N$, $M$ ($1 \le N \le 1024, 2 \le M \le 16$), separated by a single space.

Output

Output "YES" or "NO".

2 3
3 2
33 16
26 5
YES
NO
YES
NO