QOJ.ac

QOJ

時間限制: 2 s 記憶體限制: 512 MB 總分: 100

#14463. Challenge Triangle

统计

Little C has recently been studying the structure of triangles. Given three points $A, B, C$ on a 2D plane, if the line segments $AB, BC, AC$ do not overlap, we say that these three points can form a triangle.

Now, Little C has $n$ points on a 2D plane. Can you help Little C determine if it is possible to choose three points from them such that they can form a triangle?

Input

The first line contains an integer $n$ ($3 \le n \le 10^5$), representing the number of points.

Each of the next $n$ lines contains two integers $x_i, y_i$ ($-10^9 \le x_i, y_i \le 10^9$), representing the coordinates of the $i$-th point. It is guaranteed that all point coordinates are distinct.

Output

If Little C cannot find three points that satisfy the requirements, output NO; otherwise, output YES.

Examples

Input 1

4
1 1
1 2
2 1
2 2

Output 1

YES

Input 2

3
1 1
1 2
1 3

Output 2

NO

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.