Type: Default 1000ms 256MiB

L2-3 简单博弈

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

小明和小红在玩游戏,游戏规则如下:每轮游戏随机给出三个数a,b,k,他们每次都可以选择一个数对(x,y)满足1<=x<=a,1<=y<=b,使得gcd(x,y)=k,每个数对只能使用一次,若最后没有数对可以选了即失败。小明是先手,问小明能否胜利。

Format

Input

一行三个整数a,b,k 1<=k,a,b<=5e4

Output

若小明胜利输出"YES",否则输出"NO"

Samples

7 12 3
NO

Limitation

1s, 1024KiB for each test case.