#1099. Triangle

    ID: 1099 传统题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>竞赛洛谷计算几何枚举三角形判断几何判断

Triangle

Triangle

题目描述

It is a simple task, for N points on the 2D plane, you are supposed to find whether there are three points which could form a isosceles triangle.


输入说明

There are several test cases. For each case, the first line is an integer N (3 <= N <= 500) indicating the number of points. N lines follow, each line contains two doubles(not exceed 1000.0), indicating the coordinates of the points.

输出说明

For each case, if there exists a solution which could form a isosceles triangle, output “YES”, else output “NO”.

样例

输入

3
0 0
1 1
-1 1
3
0 0
1 1
5 10

输出

YES
NO