Boolean
Boolean-28
Boolean-29
Boolean-30
~/algor $ cat problems/boolean-bir-chiziqdami
On one line?
Easy
1000 ms
64 MB
19%
Three different points $(x_{1}; y_{1})$, $(x_{2}; y_{2})$ and $(x_{3}; y_{3})$ are given on the plane. Check whether the statement is true: “all three points lie on one straight line”. This condition is checked by the equality:
$$(x_{2} - x_{1}) * (y_{3} - y_{1}) = (y_{2} - y_{1}) * (x_{3} - x_{1})$$
Input
One line with six integers: $x_{1}$, $y_{1}$, $x_{2}$, $y_{2}$, $x_{3}$ and $y_{3}$.
Output
One integer: $1$ if the statement is true, otherwise $0$.
Note
$-1000 \le x_{1}, y_{1}, x_{2}, y_{2}, x_{3}, y_{3} \le 1000$
The points are different.
Examples
Input #1
0 0 1 1 3 3
Output #1
1
Input #2
0 0 1 2 3 3
Output #2
0