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

~/algor $ cat problems/simmetrik-nuqtalarmi

Are the points symmetric?

Easy 1000 ms 64 MB 18%
Share

Points $A(x_{1}; y_{1})$ and $B(x_{2}; y_{2})$ are given on the plane. Check whether the statement is true: “the points $A$ and $B$ are symmetric with respect to the origin $O(0; 0)$”, that is, $O$ is the midpoint of the segment $AB$.

Points A and B on the coordinate plane; the segment joining them passes through the origin and is halved there

Input

One line with four integers: $x_{1}$, $y_{1}$, $x_{2}$ and $y_{2}$.

Output

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

Note

$-10^{9} \le x_{1}, y_{1}, x_{2}, y_{2} \le 10^{9}$

Examples

Input #1
2 3 -2 -3
Output #1
1
Input #2
2 3 -2 3
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.