Problem

5 /5


Arrows of Ivan

Problem

Ivan the Fool (Ivan the Fool) — one of the most popular heroes of Russian, as well as Belarusian and Ukrainian fairy tales. Ivan the Fool is not really stupid, but just the last child in the family. Since he is the third son, he is not entitled to a share in the inheritance. Ivan loved archery in his free time. Launching the arrows once again, Ivan decided to see what shape they form if we connect the points of falling arrows. Although Ivan is not stupid, he still needs your help.
The coordinates of three points on the plane where Ivan's arrows fell are known. Determine the relative position of the arrows.

Input data: The program receives 6 numbers as input: x1, y1, x2, y2, x3, y3. All numbers are integers, modulo does not exceed 100. They define 3 points of the plane: a(x1, y1), b(x2, y2), c(x3, y3).
Output: It is necessary to determine the relative position of the points and display the situation code on the screen:

0 — 3 dots match;
1 — exactly 2 points out of 3 match;
2 — the points do not coincide, they lie on the same line;
3 — the points form an acute triangle;
4 — the points form a right triangle;
5 — the points form an obtuse triangle.

 
Examples
# Input Output
1 1 1 1 1 1 1 0
2 0 0 3 0 0 4 4