Three in a Line
Do the three points lie on one straight line?
Input: one line with six integers: x1 y1 x2 y2 x3 y3.
Output: YES or NO.
Constraints:
- |coordinates| ≤ 109
Sample Tests
Input 1
0 0 1 1 2 2
Output 1
YES
Input 2
0 0 1 0 0 1
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.