p03730 AtCoder Beginner Contest 060 - Choose Integers
We ask you to select some number of positive integers, and calculate the sum of them.

It is allowed to select as many integers as you like, and as large integers as you wish. You have to follow these, however: each selected integer needs to be a multiple of A, and you need to select at least one integer.

Your objective is to make the sum congruent to C modulo B. Determine whether this is possible.

If the objective is achievable, print `YES`. Otherwise, print `NO`.

Constraints

* 1 ≤ A ≤ 100
* 1 ≤ B ≤ 100
* 0 ≤ C < B

Input

Input is given from Standard Input in the following format:


A B C


Output

Print `YES` or `NO`.

Examples

Input

7 5 1


Output

YES


Input

2 2 1


Output

NO


Input

1 100 97


Output

YES


Input

40 98 58


Output

YES


Input

77 42 36


Output

NO
```python
a,b,c=map(int,input().split())
for i in range(a,b*a+1,a):
  if i%b==c: print('YES');break
else:
  print('NO')
```