100 atcoder#ABC181C. [ABC181C] Collinearity
[ABC181C] Collinearity
Score : points
Problem Statement
We have points on a two-dimensional infinite coordinate plane.
The -th point is at .
Is there a triple of distinct points lying on the same line among the points?
Constraints
- All values in input are integers.
- If , .
Input
Input is given from Standard Input in the following format:
Output
If there is a triple of distinct points lying on the same line, print Yes
; otherwise, print No
.
4
0 1
0 2
0 3
1 1
Yes
The three points lie on the line .
14
5 5
0 1
2 5
8 0
2 1
0 0
3 6
8 6
5 9
7 9
3 4
9 2
9 8
7 2
No
9
8 2
2 3
1 3
3 7
1 0
8 8
5 6
9 7
0 1
Yes