#abc088a. [abc088_a]Infinite Coins
[abc088_a]Infinite Coins
Problem Statement
E869120 has -yen coins and infinitely many -yen coins.
Determine if he can pay exactly yen using only these coins.
Constraints
- is an integer between and (inclusive).
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
If E869120 can pay exactly yen using only his -yen and -yen coins, print Yes
; otherwise, print No
.
Sample Input 1
2018
218
Sample Output 1
Yes
We can pay yen with four -yen coins and -yen coins, so the answer is Yes
.
Sample Input 2
2763
0
Sample Output 2
No
When we have no -yen coins, we can only pay a multiple of yen using only -yen coins. Since is not a multiple of , we cannot pay this amount.
Sample Input 3
37
514
Sample Output 3
Yes