시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB39727625270.986%

문제

Dr. O has two granddaughters (named Alyssa and Konari) and they keep Dr. O young!

When people ask Dr. O how old he is, rather than giving one positive integer (his age), Dr. O provides two positive integers a and k; Dr. O’s age can then be computed using the expression (a × Alyssa’s age) + (k × Konari’s age).

Given three positive integers (Dr. O’s age, Alyssa’s age, and Konari’s age), determine if the positive integers a and k exist.

입력

There is only one input line; it provides (respectively) Dr. O’s age, Alyssa’s age, and Konari’s age. Assume that 1 ≤ Konari’s age < Alyssa’s age < Dr. O’s age ≤ 150.

출력

Print 1 (one) if a and k exist, 0 (zero) otherwise. Note that a and k must both be greater than zero.

예제 입력 1

69 9 1

예제 출력 1

1

예제 입력 2

76 11 7

예제 출력 2

1

예제 입력 3

50 9 3

예제 출력 3

0

예제 입력 4

70 10 5

예제 출력 4

1

예제 입력 5

10 7 2

예제 출력 5

0