Triangle classification - MarisaOJ: Marisa Online Judge

Triangle classification

Time limit: 1000 ms
Memory limit: 256 MB
Given three points $A(x_A,y_A),B(x_B,y_B),C(x_C,y_C)$. Determine if the type of the triangle formed by these points (right, acute, obtuse). It is guaranteed that $A, B, C$ are not collinear. ### Input - A single line contains six integers $x_A,y_A,x_B,y_B,x_C,y_C$. ### Output - Print: + `RIGHT` if it is a right triangle. + `ACUTE` if it is an acute triangle. + `OBTUSE` if it is an obtuse triangle. ### Constraints - $-10^9 \le x, y \le 10^9$. ### Example Input: ``` 0 0 0 5 -1 7 ``` Output: ``` OBTUSE ```