No.882 Divisor and Multiple
Problem Statement
You are given integers $A, B$.
Determine whether there exists an integer that is a divisor of $A$ and a multiple of $B$.
Print YES if such an integer exists, and NO otherwise.
Input
$A\ B$
$1 \le A \le 100$
$1 \le B \le 100$
$A,B$ are integers.
Output
Print YES or NO according to the problem statement.
Print a newline at the end.
Sample
Sample 1
Input
12 3
Output
YES
For example, 6 is a divisor of 12 and a multiple of 3, so it satisfies the condition.
Sample 2
Input
10 3
Output
NO
The only divisors of 10 are 1,2,5,10 (and their sign-flipped counterparts), so none of them is a multiple of 3.
Sample 3
Input
13 13
Output
YES
13 satisfies the condition.
Sample 4
Input
1 1
Output
YES
The divisors of 1 are 1 (and -1).
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
QCFium
tko919