Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/boolean-biri-ikkinchisiga-bolinadimi

Is one divisible by the other?

Easy 1000 ms 64 MB 13%
Share

Two positive integers $a$ and $b$ are given. Check whether the statement is true: “$a$ is divisible by $b$ without a remainder or $b$ is divisible by $a$ without a remainder”.

One of the numbers is a multiple of the other

Input

One line with two positive integers: $a$ and $b$.

Output

One integer: $1$ if the statement is true, otherwise $0$.

Note

$1 \le a, b \le 10^{9}$

Examples

Input #1
12 4
Output #1
1
Input #2
6 9
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.