#P1505D. Xenolith? Hippodrome?

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".

Samples

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