/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 200 点
問題文
高橋君は長さ A センチメートルの化繊のリボンを持っています。これを左端から B センチメートルずつ切っていき、長さ B センチメートルのリボンをできるだけ多く作ります。
切り終えたとき、 B センチメートルに足りない余りの部分が残らないなら Yes を、余りが残るなら No を出力してください。
制約
- 1 \leq A \leq 1000
- 1 \leq B \leq 1000
- 入力はすべて整数
入力
入力は以下の形式で標準入力から与えられる。
A B
- 1 行目には、リボンの長さ A と切り分ける長さ B がスペース区切りで与えられる。
出力
余りが残らないなら Yes を、残るなら No を 1 行で出力せよ。
入力例 1
12 4
出力例 1
Yes
入力例 2
10 3
出力例 2
No
入力例 3
7 7
出力例 3
Yes
入力例 4
956 673
出力例 4
No
入力例 5
702 351
出力例 5
Yes
Score : 200 pts
Problem Statement
Takahashi has a synthetic fiber ribbon of length A centimeters. He cuts it into pieces of B centimeters each, starting from the left end, making as many ribbons of length B centimeters as possible.
When he finishes cutting, print Yes if no leftover part shorter than B centimeters remains, and No if a remainder remains.
Constraints
- 1 \leq A \leq 1000
- 1 \leq B \leq 1000
- All inputs are integers.
Input
The input is given from standard input in the following format:
A B
- The first line contains the length of the ribbon A and the length to cut B, separated by a space.
Output
Print Yes on a single line if no remainder remains, and No if a remainder remains.
Sample Input 1
12 4
Sample Output 1
Yes
Sample Input 2
10 3
Sample Output 2
No
Sample Input 3
7 7
Sample Output 3
Yes
Sample Input 4
956 673
Sample Output 4
No
Sample Input 5
702 351
Sample Output 5
Yes