Find Extra One

题意翻译

# 题目简述 平面直角坐标系上有n个点,它们都不在y轴上。现在请你检查是否可以去掉一个点,使所有点都位于y轴的同一边。 # 输入格式 第一行为n。(2<=n<=100000) 接下来为n行Xi和Yi(Xi,Yi的绝对值<=1000000000,Xi!=0),没有任意两点重合。 # 输出格式 如果可以去掉一个点使所有点位于y轴同一边,输出“Yes”,反之输出“No”。 大写小写都可以。 # 说明 第一个样例中,删除第二个点。 第二个样例中,无法达到目标。 第三个样例中,随便删除一个点都可以。

题目描述

You have $ n $ distinct points on a plane, none of them lie on $ OY $ axis. Check that there is a point after removal of which the remaining points are located on one side of the $ OY $ axis.

输入输出格式

输入格式


The first line contains a single positive integer $ n $ ( $ 2<=n<=10^{5} $ ). The following $ n $ lines contain coordinates of the points. The $ i $ -th of these lines contains two single integers $ x_{i} $ and $ y_{i} $ ( $ |x_{i}|,|y_{i}|<=10^{9} $ , $ x_{i}≠0 $ ). No two points coincide.

输出格式


Print "Yes" if there is such a point, "No" — otherwise. You can print every letter in any case (upper or lower).

输入输出样例

输入样例 #1

3
1 1
-1 -1
2 -1

输出样例 #1

Yes

输入样例 #2

4
1 1
2 2
-1 1
-2 2

输出样例 #2

No

输入样例 #3

3
1 2
2 1
4 60

输出样例 #3

Yes

说明

In the first example the second point can be removed. In the second example there is no suitable for the condition point. In the third example any point can be removed.