Author: | A. Verkholat | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 256 Mb | |
Output file: | Standard output |
Vasya has three integers: A, B and C, initially number C is equal to zero.
He can use two following operations any number of times.
1) Add number A to number C.
2) Subtract number B from number C.
Vasya also has some integer X (possibly negative) and wants to get it from number C.
Determine if this is always possible or not?
First line contains 2 integers: A and B.
Answer to the problem - YES or NO.
0≤A≤500
0≤B≤500
In first example Vasya can get any integer number.
In second example it is impossible to get number 14.
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|