Right Triangle
Do the three points form a right triangle (non-degenerate)?
Input: one line with six integers: x1 y1 x2 y2 x3 y3.
Output: YES or NO.
Constraints:
- |coordinates| ≤ 104
Sample Tests
Input 1
0 0 3 0 0 4
Output 1
YES
Input 2
0 0 1 1 2 2
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.