Boolean
Boolean-42
Boolean-43
Boolean-44
~/algor $ cat problems/bir-xil-rangli-kataklar
Squares of the same colour
Medium
1000 ms
64 MB
41%
Two squares of a chessboard $(x_{1}; y_{1})$ and $(x_{2}; y_{2})$ are given (they may coincide). A square is given as $(x; y)$: $x$ is the column number (from left to right), $y$ is the row number (from bottom to top). The square $(1; 1)$ is black. Check whether the statement is true: “these squares have the same colour”.
Input
One line with four positive integers: $x_{1}$, $y_{1}$, $x_{2}$ and $y_{2}$.
Output
One integer: $1$ if the statement is true, otherwise $0$.
Note
$1 \le x_{1}, y_{1}, x_{2}, y_{2} \le 8$
Examples
Input #1
1 1 2 2
Output #1
1
Input #2
1 1 1 2
Output #2
0