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

~/algor $ cat problems/oxirgi-raqamlari-tengmi

Same last digit?

Easy 1000 ms 64 MB 16%
Share

Positive integers $a$ and $b$ are given. Check whether the statement is true: “the numbers $a$ and $b$ have the same last digit”.

The digits of two numbers in cells; the last digits are compared

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
127 57
Output #1
1
Input #2
120 21
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.