AtCoder Beginner Contest 181
C
Collinearity
AtCoder
⌀ 248
原题
← BD →
翻译中…

Problem Statement

翻译中…

We have $N$ points on a two-dimensional infinite coordinate plane.

翻译中…

The $i$-th point is at $(x_i,y_i)$.

翻译中…

Is there a triple of distinct points lying on the same line among the $N$ points?

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $3 \leq N \leq 10^2$
  • $|x_i|, |y_i| \leq 10^3$
  • If $i \neq j$, $(x_i, y_i) \neq (x_j, y_j)$.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
x_1 y_1
\vdots
x_N y_N

翻译中…

Output

翻译中…

If there is a triple of distinct points lying on the same line, print Yes; otherwise, print No.

翻译中…

样例

Input #1
4
0 1
0 2
0 3
1 1
Output #1
Yes
The three points $(0, 1), (0, 2), (0, 3)$ lie on the line $x = 0$.
Input #2
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
Output #2
No
Input #3
9
8 2
2 3
1 3
3 7
1 0
8 8
5 6
9 7
0 1
Output #3
Yes
题目信息
题号
abc181_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。