問題一覧 > 通常問題

No.882 Divisor and Multiple

レベル : / 実行時間制限 : 1ケース 0.500秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 420
作問者 : QCFium / テスター : tko919
お気に入りにしたユーザー ProblemId : 3354 / 自分の提出
問題文最終更新日: 2019-09-02 13:42:10
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 223 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。