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.


-----Input-----

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.


-----Output-----

Print "Yes" if there is such a point, "No" — otherwise.

You can print every letter in any case (upper or lower).


-----Examples-----
Input
3
1 1
-1 -1
2 -1

Output
Yes
Input
4
1 1
2 2
-1 1
-2 2

Output
No
Input
3
1 2
2 1
4 60

Output
Yes


-----Note-----

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.

Difficulty: EASY
Tags: Geometry

Implementation

Starter code:

Solutions:
test = int(input())
(countp, countn) = (0, 0)
for t in range(test):
	point = list(input().split(' '))
	(point[0], point[1]) = (int(point[0]), int(point[1]))
	if point[0] < 0:
		countn += 1
	elif point[0] > 0:
		countp += 1
if countn <= 1 or countp <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
minus = plus = 0
for i in range(0, n):
	(a, b) = map(int, input().split())
	if a < 0:
		minus += 1
	else:
		plus += 1
plus = min(plus, minus)
if plus < 2:
	print('Yes')
else:
	print('No')


n = int(input())
p = [0, 0]
for point in range(n):
	(x, y) = [int(s) for s in input().split(' ')]
	p[int(x < 0)] += 1
if min(p) > 1:
	print('No')
else:
	print('Yes')


pos = 0
neg = 0
n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		pos += 1
	else:
		neg += 1
if pos >= 2 and neg > 1 or (neg >= 2 and pos > 1):
	print('NO')
else:
	print('YES')


count = int(input())
inp = []
for x in range(count):
	inp.append(list(map(int, input().split())))
countl = 0
countr = 0
for x in inp:
	if x[0] > 0:
		countr += 1
	if x[0] < 0:
		countl += 1
print('Yes' if countl <= 1 or countr <= 1 else 'No')


n_points = int(input())
(left, right) = (0, 0)
for i in range(n_points):
	if int(input().split()[0]) < 0:
		left += 1
	else:
		right += 1
if left > 1 and right > 1:
	print('No')
else:
	print('Yes')


n = int(input())
l = 0
r = 0
for _ in range(n):
	(x, y) = (int(i) for i in input().split())
	if x < 0:
		r += 1
	else:
		l += 1
if r == 1 or l == 1 or l == 0 or (r == 0):
	print('Yes')
else:
	print('No')


n = int(input())
num = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		num += 1
if num <= 1 or num >= n - 1:
	print('Yes')
else:
	print('No')


pos = 0
neg = 0
axis = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x < 0:
		neg += 1
	elif x > 0:
		pos += 1
	else:
		axis += 1
if pos == 1 or neg == 1 or axis == 1 or (neg == 0 and axis == 0) or (pos == 0 and axis == 0):
	print('YES')
else:
	print('NO')


n = int(input())
negative = 0
positive = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		negative += 1
	elif x > 0:
		positive += 1
a = min(negative, positive)
if a <= 1 or a <= 0:
	print('Yes')
else:
	print('No')


n = int(input())
(r, l) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		r += 1
	else:
		l += 1
print('Yes' if min(r, l) < 2 else 'No')


n = int(input())
pos = 0
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		pos += 1
if pos == n or pos == n - 1 or pos <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
cleft = 0
cright = 0
for _ in range(n):
	tocke = list(map(int, input().strip().split()))
	if tocke[0] < 0:
		cleft += 1
	if tocke[0] > 0:
		cright += 1
if cleft <= 1 or cright <= 1:
	print('Yes')
else:
	print('No')


c = [0, 0]
for i in range(int(input())):
	c[int(input().split()[0]) < 0] += 1
print(('YES', 'NO')[min(c) > 1])


n = int(input())
lcnt = 0
rcnt = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		lcnt += 1
	else:
		rcnt += 1
if lcnt <= 1 or rcnt <= 1:
	print('Yes')
else:
	print('No')


ru = int(input())
l = 0
r = 0
for i in range(ru):
	(x, y) = map(int, input().split())
	if x < 0:
		l += 1
	else:
		r += 1
muxi = max(l, r)
if abs(l - r) == muxi or abs(l - r) == muxi - 1:
	print('Yes')
else:
	print('No')


n_points = int(input())
neg = list()
pos = list()
for _ in range(n_points):
	(x, y) = input().split(' ')
	if int(x) < 0:
		neg.append(x)
	else:
		pos.append(x)
print('Yes' if len(neg) <= 1 or len(pos) <= 1 else 'No')


n = int(input())
ct1 = 0
ct2 = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		ct1 += 1
	else:
		ct2 += 1
if ct1 < 2 or ct2 < 2:
	print('Yes')
else:
	print('No')


n = int(input())
a = 0
b = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x >= 0:
		a += 1
	else:
		b += 1
if a > 1 and b > 1:
	print('No')
else:
	print('Yes')


n = int(input())
(p, q) = (0, 0)
for i in range(n):
	(k, l) = map(int, input().split())
	if k > 0:
		p += 1
	else:
		q += 1
if p <= 1 or q <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
(p, q) = (0, 0)
while n:
	(x, y) = map(int, input().split())
	if x > 0:
		p += 1
	else:
		q += 1
	n -= 1
if min(p, q) <= 1:
	print('Yes')
else:
	print('No')


q = int(input())
t = 0
for i in range(q):
	(x, y) = map(int, input().split())
	if x < 0:
		t += 1
if t < 2 or t > q - 2:
	print('Yes')
else:
	print('No')


casos = int(input())
left = []
right = []
for i in range(casos):
	(x, y) = map(int, input().split())
	if x < 0:
		left.append([x, y])
	else:
		right.append([x, y])
if len(left) > 1 and len(right) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
kleft = 0
kright = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		kleft += 1
	else:
		kright += 1
if kleft <= 1 or kright <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
cp = 0
cn = 0
for _ in range(n):
	(i, j) = map(int, input().split())
	if i > 0:
		cp += 1
	elif i < 0:
		cn += 1
if cp == 1 or cn == 1 or cp == n or (cn == n):
	print('yes')
else:
	print('no')


n = int(input())
a = []
t = 0
t2 = 0
for i in range(n):
	a.append([int(x) for x in input().split()])
for i in range(n):
	if a[i][0] < 0:
		t += 1
	if a[i][0] > 0:
		t2 += 1
if t < 2 or t2 < 2:
	print('Yes')
else:
	print('No')


n = int(input())
st = [0] * 2
for i in range(n):
	(x, y) = [int(i) for i in input().split(' ')]
	if x >= 0 and y >= 0 or (x >= 0 and y <= 0):
		st[0] += 1
	elif x <= 0 and y >= 0 or (x <= 0 and y <= 0):
		st[1] += 1
if st[0] <= 1 or st[1] <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
pos = 0
neg = 0
for x0 in range(n):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x > 0:
		pos += 1
	else:
		neg += 1
if min(pos, neg) <= 1:
	print('Yes')
else:
	print('No')


import sys
n = int(input())
i = 0
count_pos = 0
count_neg = 0
while i < n:
	if int(input().split()[0]) > 0:
		count_pos += 1
	else:
		count_neg += 1
	if i > 2 and min([count_pos, count_neg]) > 1:
		print('No')
		sys.exit()
	i += 1
print('Yes')


n = int(input())
(positive, negative) = (0, 0)
for i in range(0, n):
	(x, y) = input().split(' ')
	(x, y) = (int(x), int(y))
	if x > 0:
		positive += 1
	else:
		negative += 1
if positive < 2 or negative < 2:
	print('Yes')
else:
	print('No')


n = int(input())
pos = 0
neg = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		pos += 1
	elif a < 0:
		neg += 1
if pos == 1 or neg == 1 or pos == 0 or (neg == 0):
	print('Yes')
else:
	print('No')


n = int(input())
a = []
for i in range(n):
	(x, y) = input().split(' ')
	x = float(x)
	a.append(x)
c = a[:]
b = min(a)
a.remove(b)
d = max(c)
c.remove(d)
s = 0
k = 0
g = 0
if b < 0:
	for i in range(0, len(a)):
		if a[i] > 0:
			s += 1
		else:
			k += 1
	if s * k != 0:
		g = 1
hh = 0
hhh = 0
gh = 0
if d > 0:
	for i in range(0, len(c)):
		if c[i] > 0:
			hh += 1
		else:
			hhh += 1
	if hh * hhh != 0:
		gh = 1
if g * gh != 0:
	print('No')
else:
	print('Yes')


def validator(chunk: int) -> int:
	pass
test_case: int = int(input())
count: int = 0
for i in range(test_case):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		count += 1
if count == 0 or count == test_case or count == 1 or (count == test_case - 1):
	print('YES')
else:
	print('NO')


po = 0
ne = 0
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if n > 0:
		po += 1
	else:
		ne += 1
if min(po, ne) < 2:
	print('Yes')
else:
	print('No')


def validarPuntos(puntos):
	(contadorR, contadorL) = (0, 0)
	for i in range(len(puntos)):
		if puntos[i][0] > 0:
			contadorR += 1
		elif puntos[i][0] < 0:
			contadorL += 1
	if contadorL <= 1 or contadorR <= 1:
		print('YES')
	else:
		print('NO')
puntos = []
n = int(input())
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	puntos.append([x, y])
validarPuntos(puntos)


n = int(input())
x = sum((int(input().split()[0]) > 0 for i in range(n)))
print('Yes' if x <= 1 or x >= n - 1 else 'No')


n = int(input())
pos = 0
neg = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		pos += 1
	elif a < 0:
		neg += 1
if min(pos, neg) <= 1:
	print('YES')
else:
	print('NO')


def func():
	n = int(input())
	left = 0
	right = 0
	for i in range(n):
		x = int(input().split()[0])
		if x > 0:
			right += 1
		else:
			left += 1
	if left <= 1 or right <= 1:
		print('Yes')
	else:
		print('No')
func()


def main():
	n = int(input())
	pos = 0
	neg = 0
	for i in range(n):
		if [int(x) for x in input().split()][0] > 0:
			pos += 1
		else:
			neg += 1
	if neg <= 1 or pos <= 1:
		print('Yes')
	else:
		print('No')
main()


n = int(input())
count = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x <= 0:
		count += 1
print('NYoe s'[count < 2 or n - count < 2::2])


t = int(input())
(yl, yr) = (0, 0)
for i in range(t):
	(x, y) = map(int, input().split())
	if x > 0:
		yr += 1
	else:
		yl += 1
if yl <= 1 or yr <= 1:
	print('Yes')
else:
	print('No')


num = int(input())
x_list = []
while num:
	y = input().split()
	x_list.append(int(y[0]))
	num = num - 1
positive = 0
negetive = 0
for i in x_list:
	if i > 0:
		positive += 1
	else:
		negetive += 1
if positive == 0 or negetive == 0 or positive == 1 or (negetive == 1):
	print('Yes')
else:
	print('No')


t = int(input())
x = []
y = []
for i in range(t):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
p = 0
n = 0
for i in range(t):
	if x[i] > 0:
		p += 1
	if x[i] < 0:
		n += 1
q = min(p, n)
if q == 1:
	print('Yes')
elif q == 0:
	print('Yes')
else:
	print('No')


a = int(input())
s1 = 0
s2 = 0
for i in range(a):
	b = input()
	f = True
	for j in b.split():
		if int(j) < 0:
			f = False
		break
	if f:
		s1 = s1 + 1
	else:
		s2 = s2 + 1
if s1 <= 1 or s2 <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
m = sum([1 if input()[0] == '-' else 0 for i in range(n)])
print('YNeos'[min(m, n - m) > 1::2])


(x, y) = (0, 0)
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a > 0:
		y = y + 1
	else:
		x = x + 1
if y < 2 or x < 2:
	print('YES')
else:
	print('NO')


n = int(input())
k1 = 0
k2 = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		k1 += 1
	else:
		k2 += 1
if k1 <= 1 or k2 <= 1:
	print('YES')
else:
	print('NO')


(r, l) = (0, 0)
for t in range(int(input())):
	if int(input().split()[0]) > 0:
		r += 1
	else:
		l += 1
	if r > 1 and l > 1:
		print('no')
		exit(0)
print('yes')


c = 0
d = 0
n = int(input())
for i in range(n):
	a = input()
	a = a.split()
	if int(a[0]) < 0:
		c += 1
	elif int(a[0]) > 0:
		d += 1
if c >= 2 and d >= 2:
	print('NO')
else:
	print('YES')


n = int(input())
n_ypos = 0
n_yneg = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		n_ypos += 1
	else:
		n_yneg += 1
if n_ypos <= 1:
	print('Yes')
elif n_yneg <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
pos = 0
neg = 0
for i in range(n):
	m = input()
	m = m.split(' ')
	x = int(m[0])
	y = int(m[1])
	pos += x > 0
	neg += x < 0
if pos <= 1 or neg <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l1 = []
inth = 0
for i in range(n):
	lh = tuple(map(int, input().split()))
	l1.append(lh)
for tup in l1:
	if tup[0] < 0:
		inth += 1
if inth == 1 or inth == n - 1 or inth == 0 or (inth == n):
	print('yes')
else:
	print('no')


n = int(input())
pos = neg = 0
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x < 0:
		neg += 1
	else:
		pos += 1
if neg == 1 or neg == 0:
	print('YES')
elif pos == 1 or pos == 0:
	print('YES')
else:
	print('NO')


n = int(input())
cnt1 = 0
cnt2 = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		cnt1 += 1
	else:
		cnt2 += 1
if cnt1 <= 1 or cnt2 <= 1:
	print('Yes')
else:
	print('No')


l = 0
r = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		r += 1
	elif x < 0:
		l += 1
if l - 1 == 0 or r - 1 == 0 or l == 0 or (r == 0):
	print('Yes')
else:
	print('No')


n = int(input())
s = [list(map(int, input().split())) for i in range(n)]
t = 0
l = 0
for i in range(n):
	if s[i][0] < 0:
		t = t + 1
	elif s[i][0] > 0:
		l = l + 1
if t <= 1 or l <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l1 = 0
l2 = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		l1 += 1
	else:
		l2 += 1
if l1 == 1 or l2 == 1 or l1 == 0 or (l2 == 0):
	print('Yes')
else:
	print('No')


t = int(input())
right = 0
left = 0
for i in range(0, t):
	xy = input().split()
	x = int(xy[0])
	if x > 0:
		right += 1
	else:
		left += 1
if min(right, left) <= 1:
	print('YES')
else:
	print('NO')


a = []
b = []
n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		a.append(x)
	else:
		b.append(x)
if len(a) <= 1 or len(b) <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
(below, above) = (0, 0)
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		above += 1
	else:
		below += 1
if above <= 1 or below <= 1:
	print('YES')
else:
	print('NO')


def main():
	N = int(input())
	left = right = 0
	for _ in range(N):
		(x, y) = map(int, input().split())
		if x < 0:
			left += 1
		else:
			right += 1
	if left <= 1 or right <= 1:
		print('Yes')
	else:
		print('No')
main()


(p, n) = ([], [])
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a > 0:
		p.append(a)
	else:
		n.append(a)
print('Yes' if len(n) <= 1 or len(p) <= 1 else 'No')


n = int(input())
count_plus = 0
count_minus = 0
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		count_plus += 1
	else:
		count_minus += 1
if (count_plus <= 1) | (count_minus <= 1):
	print('Yes')
else:
	print('No')


n = int(input())
(a1, b1) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		a1 += 1
	else:
		b1 += 1
if a1 >= 2 and b1 >= 2:
	print('NO')
else:
	print('YES')


def check_list(lst1):
	count1 = 0
	count2 = 0
	for elem in lst1:
		if elem > 0:
			count1 += 1
		else:
			count2 += 1
	if count1 != 0 and count2 != 0:
		if count1 == count2 != 1:
			return 'No'
		elif count1 != 1 and count2 > count1:
			return 'No'
		elif count2 != 1 and count1 > count2:
			return 'No'
	return 'Yes'
n = int(input())
a = list()
for i in range(n):
	(x, y) = [int(j) for j in input().split()]
	a.append(x)
print(check_list(a))


n = int(input())
L = []
for i in range(n):
	(x, y) = map(int, input().split())
	L.append((x, y))
L.sort()
nbrn = 0
nbrp = 0
for x in L:
	if x[0] < 0:
		nbrn += 1
	else:
		nbrp += 1
c = nbrn == 1 and nbrp != 1
if c or (nbrp == 1 and nbrn != 1) or nbrn == 0 or (nbrp == 0) or (nbrp == 1 and nbrn == 1):
	print('Yes')
else:
	print('No')


def main():
	n = int(input())
	r = 0
	l = 0
	for i in range(n):
		coor = input().split()
		coor = [int(x) for x in coor]
		if coor[0] < 0:
			r += 1
		else:
			l += 1
	if r <= 1 or l <= 1:
		print('YES')
	else:
		print('NO')
main()


n = int(input())
right = 0
left = 0
exist = True
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		right += 1
	else:
		left += 1
	if right > 1 and left > 1:
		exist = False
		break
if exist:
	print('Yes')
else:
	print('No')


n = list(map(int, input('').strip().split()))[0]
left = 0
right = 0
for i in range(n):
	(x, y) = list(map(int, input('').strip().split()))
	if x < 0:
		left += 1
	else:
		right += 1
if left <= 1 or right <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
pos = 0
neg = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		pos += 1
	else:
		neg += 1
if n == 2 or pos == 0 or neg == 0 or (pos == 1) or (neg == 1):
	print('Yes')
else:
	print('No')


t = int(input())
count_of_left = 0
count_of_right = 0
for i in range(t):
	(x, y) = map(int, input().split())
	if x > 0:
		count_of_right += 1
	else:
		count_of_left += 1
if count_of_right == 0 or count_of_left == 0:
	print('Yes')
elif count_of_right == 1 or count_of_left == 1:
	print('Yes')
else:
	print('No')


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().split()]

def st():
	return input()

def val():
	return int(input())

def li2():
	return [i for i in input().split()]

def li3():
	return [int(i) for i in input()]
n = val()
l1 = l2 = 0
for i in range(n):
	(a, b) = li()
	if a < 0:
		l1 += 1
	else:
		l2 += 1
print('Yes' if l1 == 1 or l2 == 1 or l1 == 0 or (l2 == 0) else 'No')


n = int(input())
left = 0
right = 0
for i in range(n):
	(x, y) = [int(i) for i in input().split()]
	if x > 0:
		right += 1
	else:
		left += 1
if left <= 1 or right <= 1:
	print('YES')
else:
	print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
ABCD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
l = 0
r = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split(' '))
	if x < 0:
		l += 1
	else:
		r += 1
if l <= 1 or r <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
(c1, c2) = (0, 0)
for i in range(n):
	(x, y) = [int(i) for i in input().split()]
	if x > 0:
		c1 += 1
	else:
		c2 += 1
if c1 <= 1 or c2 <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
neg = 0
pos = 0
while n > 0:
	n -= 1
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x > 0:
		pos += 1
	else:
		neg += 1
if neg > 1 and pos > 1:
	print('No')
else:
	print('Yes')


n = int(input())
v = []
k = []
for o in range(n):
	(x, y) = map(int, input().split())
	if abs(x) != x:
		v.append(x)
	elif abs(x) == x:
		k.append(x)
if len(v) <= 1 or len(k) <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
(y0, y1) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		y0 += 1
	else:
		y1 += 1
if y0 <= 1 or y1 <= 1:
	print('Yes')
else:
	print('No')


def main():
	n = int(input())
	(minus, plus) = (0, 0)
	for x in range(n):
		buff = list(map(int, input().split()))
		if buff[0] < 0:
			minus += 1
		else:
			plus += 1
	if plus <= 1 or minus <= 1:
		return 'Yes'
	return 'No'
print(main())


f = [0, 0]
for s in [*open(0)][1:]:
	f[s[0] != '-'] += 1
print('YNeos'[f[0] > 1 < f[1]::2])


li = []
(c1, c2) = (0, 0)
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a < 0:
		c1 += 1
	else:
		c2 += 1
if c1 <= 1 or c2 <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
myList = []
mySmallList = []
for i in range(0, n):
	(xi, yi) = map(int, input().split())
	mySmallList.append(xi)
	mySmallList.append(yi)
	myList.append(mySmallList)
	mySmallList = []
counter1 = 0
counter2 = 0
for j in range(0, n):
	if myList[j][0] > 0:
		counter1 += 1
	elif myList[j][0] < 0:
		counter2 += 1
if counter1 >= n - 1:
	print('yes')
elif counter2 >= n - 1:
	print('yes')
else:
	print('no')


n = int(input())
points1 = []
points2 = []
for i in range(n):
	p = [int(x) for x in input().split()]
	if p[0] < 0:
		points1.append(p)
	else:
		points2.append(p)
if len(points1) < 2 or len(points2) < 2:
	print('Yes')
else:
	print('No')


q = int(input())
(a, s) = (0, 0)
for i in range(0, q):
	(z, x) = list(map(int, input().split()))
	if z > 0:
		a += 1
	else:
		s += 1
if (a <= 1) | (s <= 1):
	print('Yes')
else:
	print('No')


import sys
f = sys.stdin
n = int(f.readline())
negx = 0
posx = 0
for i in range(n):
	(x, y) = map(int, f.readline().split())
	if x > 0:
		posx += 1
	else:
		negx += 1
if posx == 1 or negx == 1 or posx == 0 or (negx == 0):
	print('Yes')
else:
	print('No')


n = int(input())
x = []
for i in range(n):
	(a, b) = map(int, input().split())
	x.append(a)
pl = len(list(filter(lambda x: x >= 0, x)))
ng = len(list(filter(lambda x: x < 0, x)))
print('Yes' if pl == 0 or pl == 1 or ng == 0 or (ng == 1) else 'No')


n = int(input())
(l, r) = (0, 0)
for i in range(n):
	(a, _) = [int(k) for k in input().split()]
	if a < 0:
		l += 1
	else:
		r += 1
if min(l, r) <= 1:
	print('Yes')
else:
	print('No')


from sys import *
from collections import *
from math import *
from random import *
from datetime import date

def lStr(d=' '):
	return input().split(' ')

def lInt(d=' '):
	return [int(i) for i in input().split(d)]

def lDec(d=' '):
	return [float(i) for i in input().split(d)]
(n, *t) = lInt()
(l, r) = (0, 0)
for i in range(n):
	(x, y) = lInt()
	l += 1 if x < 0 else 0
	r += 1 if x > 0 else 0
print('Yes' if l <= 1 or r <= 1 else 'No')


n = eval(input())
i = 0
c = 0
d = 0
f1 = True
f2 = True
while i < n:
	k = input().split(' ')
	x = int(k[0])
	y = int(k[1])
	i = i + 1
	if x > 0:
		d += 1
	elif x < 0:
		c += 1
	if c > 1:
		f1 = False
	if d > 1:
		f2 = False
if f1 or f2:
	print('Yes')
else:
	print('No')


n = int(input())
kpos = 0
kneg = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x >= 0:
		kpos += 1
	else:
		kneg += 1
if kpos == 0 or kneg == 0 or (kneg == 1 and kpos > 1) or (kpos == 1 and kneg > 1) or (kpos == 1 and kneg == 1):
	print('Yes')
else:
	print('No')


n = int(input())
(pos, neg, _) = (0, 0, 0)
while _ < n:
	(a, b) = map(int, input().split())
	if a > 0:
		pos += 1
	else:
		neg += 1
	_ += 1
if pos <= 1 or neg <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
(ans, ans1) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0 and y < 0:
		ans += 1
	if x < 0 and y >= 0:
		ans += 1
	if x > 0 and y >= 0:
		ans1 += 1
	if x > 0 and y < 0:
		ans1 += 1
if (ans == 1 or ans1 == 1) or abs(ans - ans1) == n:
	print('YES')
else:
	print('NO')


import sys
from collections import defaultdict

def main():
	n = int(input())
	x_pos = 0
	x_neg = 0
	for _ in range(n):
		(x, y) = map(int, input().split())
		if x > 0:
			x_pos += 1
		else:
			x_neg += 1
	print('YES' if n < 3 or x_pos <= 1 or x_neg <= 1 else 'NO')
main()


n = int(input())
po = 0
ne = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		po += 1
	else:
		ne += 1
if min(po, ne) <= 1:
	print('Yes')
else:
	print('No')


def solve(n, p):
	xs = [p[i][0] > 0 for i in range(n)]
	right = xs.count(True)
	left = n - right
	possible = left <= 1 or right <= 1
	return 'Yes' if possible else 'No'

def main():
	n = int(input())
	p = [list(map(int, input().split())) for _ in range(n)]
	print(solve(n, p))
main()


n = int(input())
ans = 0
i = 0
while n > i:
	(x, y) = map(int, input().split())
	if x > 0:
		ans += 1
	i += 1
if min(ans, n - ans) > 1:
	print('No')
else:
	print('Yes')


import sys
import math
N = int(sys.stdin.readline())
(left, right) = (0, 0)
for _ in range(N):
	(x, y) = [int(x) for x in sys.stdin.readline().split()]
	if x < 0:
		left += 1
	else:
		right += 1
if left <= 1 or right <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
a = 0
b = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		a += 1
	elif x > 0:
		b += 1
if a == 1 or b == 1 or a == 0 or (b == 0):
	print('Yes')
else:
	print('No')


n = int(input())
cnt = 0
for i in range(n):
	l2 = list(map(int, input().split()))
	if l2[0] > 0:
		cnt += 1
if cnt == 0 or cnt == 1 or cnt == n - 1 or (cnt == n):
	print('Yes')
else:
	print('No')


n = int(input())
c = 0
d = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		c += 1
	else:
		d += 1
if c <= 1 or d <= 1:
	print('Yes')
else:
	print('No')


def checkside(a, b):
	if a < 0:
		return 0
	else:
		return 1
left = 0
right = 0
for i in range(int(input())):
	(n, m) = map(int, input().split())
	if checkside(n, m):
		left += 1
	else:
		right += 1
if left < 2 or right < 2:
	print('Yes')
else:
	print('No')


n = int(input())
sum = 0
sum2 = 0
for i in range(0, n):
	(a, b) = map(int, input().split())
	if a < 0:
		sum += 1
	else:
		sum2 += 1
if sum > 1 and sum2 > 1:
	print('No')
else:
	print('Yes')


n = int(input())
c1 = 0
c2 = 0
for i in range(n):
	[x, y] = list(map(int, input().split()))
	if x > 0:
		c1 += 1
	else:
		c2 += 1
	if c1 > 1 and c2 > 1:
		break
if c1 <= 1 or c2 <= 1:
	print('yes')
else:
	print('no')


v = []
n = int(input())
cp = 0
co = 0
for i in range(0, n):
	(x, y) = map(int, input().split())
	if x > 0:
		cp += 1
	else:
		co += 1
if cp <= 1 or co <= 1:
	print('Yes')
else:
	print('No')


n = 0
p = 0
for i in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x < 0:
		n += 1
	else:
		p += 1
if p > n and n in range(0, 2):
	print('Yes')
elif n > p and p in range(0, 2):
	print('Yes')
elif n == p and n == 1:
	print('Yes')
else:
	print('No')


x1 = 0
x2 = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		x1 += 1
	elif x < 0:
		x2 += 1
if x1 == 1 or x2 == 1 or (x1 > 1 and x2 == 0) or (x2 > 1 and x1 == 0):
	print('Yes')
else:
	print('No')


n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x)
a = sorted(a)
if a[-2] * a[0] > 0 or a[-1] * a[1] > 0:
	print('YES')
else:
	print('NO')


n = int(input())
(pos, neg) = (0, 0)
for _ in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		pos += 1
	else:
		neg += 1
if pos <= 1 or neg <= 1:
	print('YES')
else:
	print('NO')


t = int(input())
xp = []
xo = []
for i in range(t):
	(a, b) = map(int, input().split())
	if a > 0:
		xp.append(a)
	else:
		xo.append(a)
if len(xp) <= 1 or len(xo) <= 1:
	print('Yes')
else:
	print('No')


query = int(input())
pos = 0
neg = 0
for _ in range(query):
	(x, y) = map(int, input().split())
	if x >= 0:
		pos += 1
	else:
		neg += 1
if pos <= 1 or neg <= 1:
	print('YES')
else:
	print('NO')


q = 0
z = 0
for _ in range(int(input())):
	if input()[0] == '-':
		q += 1
	else:
		z += 1
print('YES' if z in [0, 1] or q in [0, 1] else 'NO')


n = int(input())
(t, s) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		t += 1
	else:
		s += 1
print(['YES', 'NO'][s >= 2 and t >= 2])


a = int(input())
rast = 0
chap = 0
for i in range(1, a + 1):
	(x, y) = map(int, input().split(' '))
	if x > 0:
		rast = rast + 1
	if x < 0:
		chap = chap + 1
if chap == 1 or rast == 1 or chap == 0 or (rast == 0):
	print('Yes')
else:
	print('No')


N = int(input())
S = 0
T = 0
for I in range(N):
	(A, B) = map(int, input().split())
	if A < 0:
		S += 1
	elif A > 0:
		T += 1
if S > 1 and T > 1:
	print('No')
else:
	print('Yes')


n = int(input())
a = 0
c = 0
for _ in range(n):
	(b, __) = map(int, input().split())
	if b < 0:
		a += 1
	if b > 0:
		c += 1
	if a > 1 and c > 1:
		break
if a < 2 or c < 2:
	print('Yes')
else:
	print('No')


n = int(input())
lis = []
for i in range(n):
	(a, b) = [int(z) for z in input().split()]
	if a <= 0:
		lis.append('neg')
	else:
		lis.append('pos')
if lis.count('pos') <= 1 or lis.count('neg') <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
count = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		count += 1
if count > 1 and count < n - 1:
	print('NO')
else:
	print('YES')


def main():
	npoints = int(input().strip())
	pts = [int(input().strip().split()[0]) for _ in range(npoints)]
	nsub = len(list(filter(lambda n: n < 0, pts)))
	print('Yes' if nsub <= 1 or len(pts) - nsub <= 1 else 'No')
main()


n = int(input())
ne = 0
p = 0
for i in range(0, n):
	(x, y) = [int(x) for x in input().split()]
	if x > 0:
		p += 1
	else:
		ne += 1
j = min(ne, p)
if j > 1:
	print('No')
else:
	print('Yes')


left = 0
right = 0
num_points = int(input())
while num_points > 0:
	(a, b) = map(int, input().split())
	if a < 0:
		left += 1
	else:
		right += 1
	num_points -= 1
if left == 1 or right == 1 or left == 0 or (right == 0):
	print('Yes')
else:
	print('No')


l = []
for _ in range(int(input())):
	l.append(list(map(int, input().split())))
c = 0
for i in range(len(l)):
	if l[i][0] < 0:
		c += 1
if c <= 1:
	print('Yes')
else:
	c = 0
	for i in range(len(l)):
		if l[i][0] > 0:
			c += 1
	if c <= 1:
		print('Yes')
	else:
		print('No')


n = int(input())
up = 0
down = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		up += 1
	else:
		down += 1
if up <= 1 or down <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
left = 0
right = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		right += 1
	if x < 0:
		left += 1
if left <= 1 or right <= 1:
	print('yes')
else:
	print('no')


n = int(input())
r = 0
l = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0 and y >= 0 or (x > 0 and y <= 0):
		r = r + 1
	else:
		l = l + 1
if min(r, l) > 1:
	print('No')
else:
	print('Yes')


x = []
y = []
for i in range(int(input())):
	point = input().split()
	x.append(int(point[0]))
	y.append(int(point[1]))
minus = 0
plus = 0
for i in x:
	if i < 0:
		minus = minus + 1
	else:
		plus = plus + 1
if minus <= 1 or plus <= 1:
	print('Yes')
else:
	print('No')


a = 2
b = 2
for i in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	if x > 0:
		a -= 1
	elif x < 0:
		b -= 1
if max(a, b) > 0:
	print('Yes')
else:
	print('No')


n = int(input())
m = sum([1 if input()[0] == '-' else 0 for i in range(n)])
print(['Yes', 'No'][min(m, n - m) > 1])


N = int(input())
L = []
(count1, count2) = (0, 0)
while N:
	(X, Y) = map(int, input().split())
	if X > 0 and Y <= 0 or (X > 0 and Y >= 0):
		count1 += 1
	else:
		count2 += 1
	N -= 1
if count1 < 2 or count2 < 2:
	print('YES')
else:
	print('NO')


n = int(input())
if n == 2 or n == 3:
	for i in range(n):
		(x, y) = map(int, input().split())
	print('YES')
else:
	count1 = 0
	count2 = 0
	for i in range(n):
		(x, y) = map(int, input().split())
		if x > 0:
			count1 += 1
		else:
			count2 += 1
	if count1 <= 1 or count2 <= 1:
		print('YES')
	else:
		print('NO')


n = int(input())
cnt1 = 0
cnt2 = 0
while n > 0:
	(a, b) = map(int, input().split())
	if a > 0:
		cnt1 += 1
	else:
		cnt2 += 1
	n -= 1
if cnt1 > 1 and cnt2 > 1:
	print('No')
else:
	print('Yes')


num = int(input())
positivo = 0
negativo = 0
r = 'Yes'
for i in range(num):
	vec = input().split(' ')
	if int(vec[0]) > 0:
		positivo += 1
	else:
		negativo += 1
	if positivo > 1 and negativo > 1:
		r = 'No'
print(r)


cor = []
a = 0
b = 0
resp = 0

def entrada_datos():
	global cor
	cor = int(input().strip())

def comprobar_punto():
	global cor
	global a
	global b
	global resp
	for x in range(cor):
		pt = input().strip()
		coor = pt.split(' ')
		if int(coor[0]) < 0:
			a += 1
		else:
			b += 1
	if b == 0 or a == 0:
		resp = 1
	if b - 1 == 0 or a - 1 == 0:
		resp = 1
	if resp:
		print('Yes')
	else:
		print('No')
entrada_datos()
comprobar_punto()


c = 0
d = 0
n = int(input())
for i in range(n):
	p = input()
	s = p.split()
	if int(s[0]) > 0:
		c += 1
	else:
		d += 1
if c <= 1 or d <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l = []
for i in range(n):
	arr = list(map(int, input().strip().split()))
	l.append(arr[0])
	l.append(arr[1])
ctr = 0
for i in range(0, len(l), 2):
	if l[i] > 0:
		continue
	else:
		ctr += 1
if ctr <= 1 or ctr == n or ctr == n - 1:
	print('Yes')
else:
	print('No')


a = int(input())
x = []
y = []
while a > 0:
	d = []
	aa = (int(i) for i in input().split(' '))
	for i in aa:
		d.append(i)
	x.append(d[0])
	y.append(d[1])
	a -= 1
flagx = 0
for i in x:
	if i >= 0:
		flagx += 1
if flagx >= 2 and len(x) - flagx >= 2:
	print('No')
else:
	print('Yes')


n = int(input())
t = 0
t2 = 0
for i in range(n):
	(x, y) = [int(j) for j in input().split()]
	if x > 0:
		t += 1
	else:
		t2 += 1
if t < 2 or t2 < 2:
	print('Yes')
else:
	print('No')


n = int(input())
x = []
z = 0
y = 0
for i in range(0, n):
	(a, b) = map(int, input().split())
	x.append(a)
	x.append(b)
for i in range(0, n * 2, 2):
	if x[i] > 0:
		z += 1
	if x[i] < 0:
		y += 1
if z >= n - 1 or y >= n - 1:
	print('Yes')
else:
	print('No')


t = int(input())
x = 0
y = 0
while t > 0:
	(a, b) = map(int, input().split())
	if a > 0:
		x += 1
	else:
		y += 1
	t -= 1
if (x == 1 or y == 1) or (x == 0 or y == 0):
	print('Yes')
else:
	print('No')


n = int(input())
(p, q) = (0, 0)
for _ in range(n):
	(a, b) = map(int, input().strip().split())
	if a < 0 and b >= 0 or (a < 0 and b <= 0):
		p += 1
	elif a > 0 and b >= 0 or (a > 0 and b <= 0):
		q += 1
print('Yes' if p < 2 or q < 2 else 'No')


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
n = int(input())
(pos, neg) = (0, 0)
for _ in range(n):
	[x, y] = list(map(int, input().split()))
	if x < 0:
		neg += 1
	else:
		pos += 1
v = min(pos, neg)
if v <= 1:
	print('Yes')
else:
	print('No')


(l, r) = (0, 0)
try:
	T = int(input())
	for t in range(T):
		(x, y) = map(int, input().split())
		if x < 0:
			l += 1
		else:
			r += 1
	if l <= 1 or r <= 1:
		print('Yes')
	else:
		print('No')
except Exception as e:
	pass


count = 0
count1 = 0
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a < 0:
		count += 1
	else:
		count1 += 1
if count1 < 2 or count < 2:
	print('Yes')
else:
	print('No')


n = int(input())
x1 = 0
x2 = 0
for i in range(n):
	(m, n) = input().split()
	(m, n) = [int(m), int(n)]
	if m > 0:
		x1 += 1
	else:
		x2 += 1
if x1 == 1 or x2 == 1:
	print('Yes')
elif x1 == 0 or x2 == 0:
	print('Yes')
else:
	print('No')


n = int(input())
s = 0
w = 0
for i in range(n):
	n1 = list(map(int, input().split()))
	if n1[0] < 0:
		s = s + 1
	else:
		w = w + 1
if s == 1 or w == 1:
	print('yes')
elif s == 0 or w == 0:
	print('yes')
else:
	print('no')


def get_int(string, n):
	s = ''
	for i in string:
		if i == ' ':
			break
		else:
			s += i
	return int(s)
n = int(input())
plus = minus = 0
for i in range(0, n):
	y = input()
	z = get_int(y, 1)
	if z > 0:
		plus += 1
	elif z < 0:
		minus += 1
if plus == 1 or minus == 1:
	print('Yes')
elif plus == 0 or minus == 0:
	print('Yes')
else:
	print('No')


n = int(input())
xs = []
for _ in range(n):
	(x, _) = input().split()
	xs.append(int(x))
xs.sort()
if all([x > 0 for x in xs[1:]]) or all([x < 0 for x in xs[:-1]]):
	print('Yes')
else:
	print('No')


from sys import stdin, stdout
n = int(stdin.readline().rstrip())
leftCount = 0
rightCount = 0
for _ in range(n):
	(x, y) = map(int, stdin.readline().rstrip().split())
	if x > 0:
		rightCount += 1
	else:
		leftCount += 1
if rightCount <= 1 or leftCount <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
num1 = 0
num2 = 0
for i in range(n):
	(a, b) = map(int, input().strip().split())
	if a > 0:
		num2 += 1
	else:
		num1 += 1
if num1 <= 1 or num2 <= 1:
	print('YES')
else:
	print('NO')


def findQuad(pt):
	if pt[0] > 0:
		return 0
	else:
		return 1
num = int(input())
cnt = [0, 0]
for _ in range(num):
	cnt[findQuad([int(x) for x in input().strip().split(' ')])] += 1
if cnt[0] <= 1 or cnt[1] <= 1:
	print('Yes')
else:
	print('No')


def main():
	co = 0
	n = int(input())
	for _ in range(n):
		(a, b) = map(int, input().split())
		if a < 0:
			co += 1
	if co <= 1 or n - co <= 1:
		print('Yes')
	else:
		print('No')
main()


n = int(input())
plane = []
z = 0
f = 0
for i in range(0, n):
	plane.append(input().split())
for g in range(0, n):
	if int(plane[g][0]) < 0:
		f = f + 1
	else:
		z = z + 1
if z == 1 or f == 1:
	print('Yes')
elif z == 0 or f == 0:
	print('Yes')
else:
	print('No')


n = int(input())
left = 0
right = 0
for i in range(1, n + 1):
	(a, b) = map(int, input().split())
	if a > 0:
		right += 1
	else:
		left += 1
if right < 2 or left < 2:
	print('Yes')
else:
	print('No')


__author__ = 'smart131'
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
a.sort()
if a[1][0] > 0 or a[n - 2][0] < 0:
	print('Yes')
else:
	print('No')


n = int(input())
(c, r) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		c += 1
	if x > 0:
		r += 1
print(['NO', 'YES'][min(c, r) <= 1])


d = {}
(d[0], d[1]) = (0, 0)
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0 and b <= 0 or (a < 0 and b > 0):
		d[0] += 1
	else:
		d[1] += 1
if d[0] == 0 and d[1] == n:
	print('YES')
elif d[1] == 0 and d[0] == n:
	print('YES')
elif d[0] == 1 and d[1] == n - 1:
	print('YES')
elif d[1] == 1 and d[0] == n - 1:
	print('YES')
else:
	print('NO')


n = int(input())
(pos, neg) = (0, 0)
for i in range(n):
	(x, y) = [int(j) for j in input().split()]
	if x > 0:
		pos += 1
	else:
		neg += 1
if pos <= 1 or neg <= 1:
	print('YES')
else:
	print('NO')


class CodeforcesTask900ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.points = []

	def read_input(self):
		self.n = int(input())
		for x in range(self.n):
			self.points.append([int(y) for y in input().split(' ')])

	def process_task(self):
		left = 0
		right = 0
		for point in self.points:
			if point[0] < 0:
				left += 1
			else:
				right += 1
		if min(left, right) <= 1:
			self.result = 'Yes'
		else:
			self.result = 'No'

	def get_result(self):
		return self.result
Solution = CodeforcesTask900ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


n = int(input())
positivex = 0
negativex = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		negativex += 1
	else:
		positivex += 1
if negativex > 1 and positivex > 1:
	print('No')
else:
	print('Yes')


a = int(input())
b = []
for r in range(0, a):
	c = list(map(int, input().split()))
	b.append(c)
n = 0
m = 0
for r in range(0, a):
	k = b[r][0]
	if int(k) > 0:
		m = m + 1
	if int(k) < 0:
		n = n + 1
if m == 1 or m == 0 or n == 1 or (n == 0):
	print('YES')
else:
	print('NO')


n = int(input())
(neg, pos) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		neg += 1
	else:
		pos += 1
if neg >= 2 and pos >= 2:
	print('No')
else:
	print('Yes')


n = int(input())
s1 = 0
s2 = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		s1 += 1
	else:
		s2 += 1
if s1 == 0 or s1 == 1 or s2 == 0 or (s2 == 1):
	print('Yes')
else:
	print('NO')


l = [input()[0] != '-' for _ in range(int(input()))]
print('Yes' if min(l.count(True), l.count(False)) < 2 else 'No')


n = int(input())
x = []
for i in range(n):
	point = list(map(int, input().split()))
	x.append(point[0])
negative = 0
positive = 0
for i in x:
	if i < 0:
		negative += 1
	elif i > 0:
		positive += 1
if negative > 1 and positive > 1:
	print('No')
else:
	print('Yes')


n = int(input())
sides = [0, 0]
for i in range(n):
	(x, _) = map(int, input().split())
	x = (x > 0) - (x < 0)
	x = (x + 1) // 2
	sides[x] += 1
print('YES' if min(sides) <= 1 else 'NO')


n = int(input())
(tl, tr) = (0, 0)
for i in range(n):
	(l, r) = list(map(int, input().split()))
	if l < 0:
		tl += 1
	else:
		tr += 1
if tr <= 1 or tl <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
a = []
k = 0
k1 = 0
for i in range(n):
	a.append(list(map(int, input().split())))
for i in range(n):
	if a[i][0] < 0:
		k += 1
	else:
		k1 += 1
if n == 2:
	print('Yes')
elif n == 3 and (k == 1 or k == 0 or k1 == 1 or (k1 == 0)):
	print('Yes')
elif k > 1:
	if k1 > 1:
		print('No')
	else:
		print('Yes')
else:
	print('Yes')


import sys
import math
c1 = 0
c2 = 0
for xxx in range(int(input())):
	(n, m) = map(int, sys.stdin.readline().split(' '))
	if n < 0:
		c1 += 1
	if n > 0:
		c2 += 1
if c1 <= 1 or c2 <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
(l, r) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		l += 1
	else:
		r += 1
if l >= r and r <= 1 or (r >= l and l <= 1):
	print('YES')
else:
	print('NO')


n = int(input())
r1 = 0
r2 = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		r1 += 1
	else:
		r2 += 1
if min(r1, r2) <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
countl = 0
countr = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		countl += 1
	else:
		countr += 1
if min(countl, countr) <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
y = []
x = []
for i in range(n):
	xy = input()
	xi = int(xy[:xy.find(' ')])
	yi = int(xy[xy.find(' '):])
	x.append(xi)
	y.append(yi)
count1 = 0
count2 = 0
for i in range(n):
	if int(x[i]) > 0:
		count1 += 1
	else:
		count2 += 1
if count1 <= 1 or count2 <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
(left, right) = (0, 0)
for i in range(n):
	(x, y) = input().split()
	(x, y) = (int(x), int(y))
	if x < 0:
		left += 1
	elif x > 0:
		right += 1
if left < 2 or right < 2:
	print('Yes')
else:
	print('No')


countn = 0
countp = 0
for _ in range(int(input())):
	(n, m) = list(map(int, input().split()))
	if n < 0:
		countn += 1
	if n > 0:
		countp += 1
if min(countn, countp) >= 2:
	print('No')
else:
	print('Yes')


n = int(input())
more = 0
less = 0
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		more += 1
	elif x < 0:
		less += 1
if min(more, less) <= 1:
	print('Yes')
else:
	print('No')


c = []
p = n = int(0)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	c.append(a)
for x in c:
	if x > 0:
		p = p + 1
	else:
		n = n + 1
if p <= 1 or n <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
x1 = 0
x2 = 0
for q in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		x1 = x1 + 1
	elif x < 0:
		x2 = x2 + 1
if x2 <= 1 or x1 <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
tuples = []
po = 0
ne = 0
for N in range(n):
	a = [int(i) for i in input().split()]
	tuples.append(a)
for N in range(n):
	if tuples[N][0] > 0:
		po += 1
	else:
		ne += 1
if ne in [1, 0] or po in [1, 0]:
	print('Yes')
else:
	print('No')


n = int(input())
t = n
x = []
pos = 0
neg = 0
while n > 0:
	a = [int(x) for x in input().split()]
	if a[0] > 0:
		pos = pos + 1
	else:
		neg = neg + 1
	n = n - 1
if t - pos > 1 and t - neg > 1:
	print('No')
else:
	print('Yes')


n = int(input())
pos = 0
neg = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		neg += 1
	else:
		pos += 1
	if neg > 1 and pos > 1:
		break
if neg > 1 and pos > 1:
	print('NO')
else:
	print('YES')


n = int(input())
a = 0
b = 0
for i in range(n):
	xy = input().split()
	if int(xy[0]) > 0:
		a += 1
	else:
		b += 1
if min(a, b) <= 1:
	print('Yes')
else:
	print('No')


n = input().strip()
neg_x = 0
pos_x = 0
for x in range(int(n)):
	line = input().strip()
	x = int(line.split()[0])
	if x > 0:
		pos_x += 1
	else:
		neg_x += 1
if pos_x <= 1 or neg_x <= 1:
	print('Yes')
else:
	print('No')


x = int(input())
s = []
for n in range(x):
	a = [int(k) for k in input().split()]
	s.append(a[0] / abs(a[0]))
if s.count(-1) > s.count(1):
	if s.count(1) > 1:
		print('No')
	else:
		print('Yes')
elif s.count(-1) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
l = 0
r = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		l += 1
	else:
		r += 1
if l >= 2 and r >= 2:
	print('No')
else:
	print('Yes')


n = int(input())
(left_points, right_points) = (0, 0)
points = [[int(x) for x in input().split(' ')] for i in range(n)]
for point in points:
	if point[0] < 0:
		left_points += 1
	else:
		right_points += 1
if left_points == 1 or right_points == 1 or left_points == 0 or (right_points == 0):
	print('Yes')
else:
	print('No')


n = int(input())
b = 0
f = 0
for i in range(n):
	(c, d) = map(int, input().split())
	if c < 0:
		b += 1
	else:
		f += 1
if b == 0 or b == 1 or f == 0 or (f == 1):
	print('YES')
else:
	print('NO')


n = int(input())
A = [list(map(int, input().split())) for i in range(n)]
ans = 'No'
spr = 0
slv = 0
for i in range(n):
	for j in range(1):
		if A[i][0] > 0:
			spr = spr + 1
		elif A[i][0] < 0:
			slv = slv + 1
if spr >= 1 and slv <= 1 or (slv >= 1 and spr <= 1) or slv == 0 or (spr == 0):
	ans = 'Yes'
print(ans)


n = int(input())
(s, l) = (0, 0)
for i in range(n):
	(k, m) = map(int, input().split())
	if k > 0 and m >= 0:
		s += 1
	if k > 0 and m < 0:
		s += 1
	if k < 0 and m >= 0:
		l += 1
	if k < 0 and m < 0:
		l += 1
if s == 0 or s == 1 or l == 1 or (l == 0):
	print('Yes')
else:
	print('No')


n = int(input())
a = 0
b = 0
for i in range(n):
	(c, _) = input().split()
	if int(c) < 0:
		a += 1
	else:
		b += 1
if a < 2 or b < 2:
	print('Yes')
else:
	print('No')


foo = int(input())
gr = 0
lo = 0
for i in range(foo):
	bar = int(input().split(' ')[0])
	if bar < 0:
		lo += 1
	else:
		gr += 1
	if lo > 1 and gr > 1:
		print('No')
		break
else:
	print('Yes')


n_cases = int(input())
x_neg = 0
x_pos = 0
such_a_point = True
for x in range(0, n_cases):
	int_list = str(input()).split()
	x = int(int_list[0])
	y = int(int_list[1])
	if x < 0:
		x_neg += 1
	else:
		x_pos += 1
if x_neg >= 2 and x_pos >= 2:
	print('No')
else:
	print('Yes')


num = int(input())
pos = 0
neg = 0
for i in range(num):
	i = input()
	if i[0] == '-':
		neg += 1
	else:
		pos += 1
	if pos > 1 and neg > 1:
		print('No')
		exit()
print('Yes')


(n, m) = (0, 0)
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		n += 1
	elif x < 0:
		m += 1
	else:
		pass
if min(m, n) >= 2:
	print('NO')
else:
	print('YES')


n = int(input())
leftQ = 0
rightQ = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		leftQ += 1
	else:
		rightQ += 1
if leftQ <= 1 or rightQ <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l = 0
minus = 0
plus = 0
y = [0] * n
for i in range(n):
	(y[i], l) = map(int, input().split())
	if y[i] < 0:
		minus = minus + 1
	else:
		plus = plus + 1
if minus == 1 or plus == 1:
	print('Yes')
elif minus == 0 or plus == 0:
	print('Yes')
else:
	print('No')


T = int(input())
c = []
n = 0
n2 = 0
for t in range(T):
	(a, b) = map(int, input().split())
	c.append(a)
for items in c:
	if items > 0:
		n = n + 1
	elif items < 0:
		n2 = n2 + 1
if n > 1:
	if n2 > 1:
		print('no')
	elif n2 == 1:
		print('yes')
	else:
		print('yes')
elif n2 > 1:
	if n > 1:
		print('no')
	elif n2 == 1:
		print('yes')
	else:
		print('yes')
else:
	print('yes')


n = int(input())
otr = 0
pol = 0
for i in range(n):
	(a, b) = input().split()
	if int(a) < 0:
		otr += 1
	else:
		pol += 1
if otr == 1 or pol == 1 or otr == 0 or (pol == 0):
	print('Yes')
else:
	print('No')


n = int(input())
liste = []
for i in range(n):
	(a, b) = input().split(' ')
	liste.append((int(a), int(b)))
which_side = []
for (a, b) in liste:
	which_side.append(a > 0)
if which_side.count(0) > 1 and which_side.count(1) > 1:
	print('No')
else:
	print('Yes')


t = int(input())
aa = []
bb = []
for _ in range(t):
	(a, b) = list(map(int, input().split(' ')))
	if a < 0:
		aa.append([a, b])
	else:
		bb.append([a, b])
if len(aa) <= 1 or len(bb) <= 1:
	print('YES')
else:
	print('NO')


num = int(input())
numlist = []
for i in range(num):
	xy = input()
	xy = xy.split()
	xy = [int(x) for x in xy]
	numlist.append(xy)
xminusCount = 0
xplusCount = 0
for n in numlist:
	if n[0] < 0:
		xminusCount += 1
	else:
		xplusCount += 1

def decide():
	dec = 0
	if xminusCount <= 1 or xplusCount <= 1:
		dec = 1
	return dec
dec = decide()
if dec == 1:
	print('YES')
else:
	print('NO')


n = int(input())
d = 0
s = 0
for t in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		d += 1
	else:
		s += 1
if s == 0 or d == 0 or s == 1 or (d == 1):
	print('Yes')
else:
	print('No')


t = int(input())
(p, n) = (0, 0)
for i in range(t):
	(x, y) = map(int, input().split())
	if x < 0:
		n += 1
	else:
		p += 1
if p <= 1 or n <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
plus = 0
minus = 0
for i in range(n):
	s = input()
	k = list(map(int, s.split()))
	if k[0] > 0:
		plus += 1
	else:
		minus += 1
if plus <= 1:
	print('YES')
	exit()
elif minus <= 1:
	print('YES')
	exit()
else:
	print('NO')


n = int(input())
(t1, t2) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		t1 += 1
	else:
		t2 += 1
print('Yes' if t1 <= 1 or t2 <= 1 else 'No')


n = int(input())
a = 0
b = 0
for i in range(n):
	x = int(input().split()[0])
	if x > 0:
		a += 1
	else:
		b += 1
if a > 1 and b > 1:
	print('NO')
else:
	print('YES')


n = int(input())
a = []
b = []
for i in range(n):
	a.append([int(x) for x in input().split()])
	b.append(a[i][0] > 0)
print('Yes' if min(b.count(True), b.count(False)) < 2 else 'No')


n = int(input())
cnt1 = 0
cnt2 = 0
m = n
while n is not 0:
	n -= 1
	(x, y) = map(int, input().split())
	if x > 0:
		cnt1 += 1
	else:
		cnt2 += 1
print('YES' if cnt1 is 1 or cnt2 is 1 or cnt1 is m or (cnt2 is m) else 'NO')


n = int(input())
pos = 0
neg = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		pos += 1
	else:
		neg += 1
print(['No', 'Yes'][min(pos, neg) <= 1])


(a, b) = (0, 0)
for i in range(int(input())):
	(n, m) = map(int, input().split())
	if n < 0:
		a += 1
	else:
		b += 1
	if a > 1 and b > 1:
		print('NO')
		break
else:
	print('YES')


a = []
f = 0
n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	f += x > 0
if f >= 2:
	f = n - f
print('YES' if f < 2 else 'NO')


n = int(input())
neg = pos = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		neg += 1
	elif x > 0:
		pos += 1
a = min(neg, pos)
if a == 1 or a == 0:
	print('Yes')
else:
	print('No')


n = int(input())
l = []
for i in range(n):
	m = list(map(int, input().split()))
	l.append(m)
count = 0
plus = 0
c = 0
for i in range(n):
	if l[i][0] >= 0:
		count += 1
	elif l[i][0] < 0:
		plus += 1
if plus < 2 or count < 2:
	print('YES')
else:
	print('NO')


n = int(input())
k = 0
for j in range(n):
	a = [int(t) for t in input().split()]
	if a[0] > 0:
		k += 1
if k == 0 or k == 1 or k == n or (k == n - 1):
	print('Yes')
else:
	print('No')


n = int(input())
st1 = True
st2 = True
k1 = 0
k2 = 0
k = 1
while (st1 or st2) and k <= n:
	s = input()
	a = int(s.split()[0])
	if a < 0 and st1 != False:
		if k1 == 0:
			k1 += 1
		else:
			st1 = False
	if a > 0 and st2 != False:
		if k2 == 0:
			k2 += 1
		else:
			st2 = False
	if k1 > 1 and k2 > 1:
		st1 = False
		st2 = False
		break
	k += 1
if st1 or st2:
	print('Yes')
else:
	print('No')


n = int(input())
a = [input() for i in range(n)]
p = 0
for j in range(n):
	if a[j][0] == '-':
		p += 1
if p > 1 and n - p > 3:
	print('NO')
elif n - p > 1 and p > 1:
	print('NO')
else:
	print('YES')


def a():
	n = int(input())
	count_neg = 0
	count_pos = 0
	while n:
		n -= 1
		[x, y] = [int(i) for i in input().split()]
		if x < 0:
			count_neg += 1
		elif x > 0:
			count_pos += 1
	if count_pos <= 1 or count_neg <= 1:
		print('Yes')
	else:
		print('No')
a()


(y, x) = (0, 0)
for _ in range(int(input())):
	a = int(input().split()[0])
	if a > 0:
		x += 1
	else:
		y += 1
print('Yes' if x <= 1 or y <= 1 else 'No')


n = int(input())
positive = 0
negative = 0
result = 'YES'
for i in range(n):
	point = list(map(int, input().split()))
	if point[0] > 0:
		positive += 1
	else:
		negative += 1
	if positive > 1 and negative > 1:
		result = 'NO'
		break
print(result)


n = int(input())
if n == 2 or n == 3:
	print('Yes')
	exit(0)
(c1, c2) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		c1 += 1
	else:
		c2 += 1
if c1 <= 1 or c2 <= 1:
	print('Yes')
else:
	print('No')


import sys
input = sys.stdin.readline
n = int(input())
neg = 0
pos = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		neg += 1
	else:
		pos += 1
	if neg > 1 and pos > 1:
		print('No')
		exit(0)
print('Yes')


n = int(input())
l = sorted([int(input().split()[0]) for _ in range(n)])
if l[1] > 0 or l[-2] < 0:
	print('yes')
else:
	print('no')


n = int(input())
pluses = 0
minuses = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		pluses += 1
	else:
		minuses += 1
print('Yes' if pluses <= 1 or minuses <= 1 else 'No')


import sys
import io, os
input = sys.stdin.buffer.readline
n = int(input())
XY = [0] * n
cnt = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		cnt += 1
if cnt == 1 or n - cnt == 1 or n - cnt == 0 or (cnt == 0):
	print('Yes')
else:
	print('No')


n = int(input())
coordinates = [[int(j) for j in input().split()] for i in range(n)]
left_of_y_axis = 0
right_of_y_axis = 0
for i in range(n):
	if coordinates[i][0] > 0:
		right_of_y_axis += 1
	else:
		left_of_y_axis += 1
if left_of_y_axis == 0 or right_of_y_axis == 0:
	print('Yes')
elif left_of_y_axis == 1 or right_of_y_axis == 1:
	print('Yes')
else:
	print('No')


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	a = []
	b = []
	for _ in range(n):
		(x, y) = LI()
		if x < 0:
			a.append(1)
		else:
			b.append(1)
	if len(a) > 1 and len(b) > 1:
		return 'No'
	return 'Yes'
print(main())


n = 0
p = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a > 0:
		p += 1
	else:
		n += 1
if n <= 1:
	print('YES')
elif p <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
k = 0
j = 0
for i in range(n):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if (x, y) > (0, 0):
		k = k + 1
	elif (x, y) < (0, 0):
		j = j + 1
if k == n:
	print('Yes')
elif j == n:
	print('Yes')
elif k == 1:
	print('Yes')
elif j == 1:
	print('Yes')
else:
	print('No')


t = int(input())
cnt = 0
for _ in range(t):
	(x, y) = map(int, input().strip().split())
	if x < 0:
		cnt += 1
print('Yes' if cnt <= 1 or t - cnt <= 1 else 'No')


(l, r) = (0, 0)
for t in range(int(input())):
	(a, b) = map(int, input().split())
	if a > 0:
		r += 1
	else:
		l += 1
if l > r:
	if r < 2:
		print('Yes')
	else:
		print('No')
elif l < 2:
	print('Yes')
else:
	print('No')


t = int(input())
s = 0
p = 0
for v in range(0, t):
	(x, y) = map(int, input().split())
	if x > 0:
		s += 1
	else:
		p += 1
if s == 0 or p == 0:
	print('Yes')
elif s == 1 or p == 1:
	print('Yes')
else:
	print('No')


i = input
n = int(i())
x = sum((int(i().split()[0]) > 0 for _ in [0] * n))
print('YNEOS'[1 < x < n - 1::2])


import collections
Point = collections.namedtuple('Point', ['x', 'y'])
n = int(input())
coords = []
for _ in range(n):
	(x, y) = map(int, input().split())
	coords.append(Point(x, y))
l = 0
r = 0
for p in coords:
	if p.x > 0:
		r += 1
	else:
		l += 1
if l == 0 or l == 1 or r == 0 or (r == 1):
	print('Yes')
else:
	print('No')


num = int(input())
k = 0
result = [0, 0]
while k < num:
	arr = input().split()
	if int(arr[0]) < 0:
		result[0] += 1
	else:
		result[1] += 1
	k += 1
if (result[0] == 0 or result[1] == 0) or (result[0] == 1 or result[1] == 1):
	print('Yes')
else:
	print('No')


n = int(input())
t = 0
f = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		t += 1
	else:
		f += 1
if f < 2 or t < 2:
	print('YES')
else:
	print('NO')


n = int(input())
col_l = 0
col_r = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		col_r += 1
	else:
		col_l += 1
if col_r > 1 and col_l > 1:
	print('No')
else:
	print('Yes')


a = b = 0
for i in range(int(input())):
	(c, d) = map(int, input().split())
	if c > 0:
		a += 1
	else:
		b += 1
	if a > 1 and b > 1:
		exit(print('No'))
print('Yes')


points = []
for _ in range(int(input())):
	points.append(list(map(int, input().split())))
d = {'1st': [], '2nd': []}
for point in points:
	if point[0] >= 0 and point[1] >= 0 or (point[0] >= 0 and point[1] <= 0):
		d['1st'].append(point)
	if point[0] <= 0 and point[1] <= 0 or (point[0] <= 0 and point[1] >= 0):
		d['2nd'].append(point)
if len(d['1st']) == 1 or len(d['2nd']) == 1 or len(d['1st']) == 0 or (len(d['2nd']) == 0):
	print('Yes')
else:
	print('No')


import math
import sys
n = int(input())
cnt = 0
cn = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		cnt += 1
	else:
		cn += 1
if cn == 1 or cnt == 1 or cnt == 0 or (cn == 0):
	print('Yes')
else:
	print('No')


left = right = 0
for _ in range(int(input())):
	if input()[0] == '-':
		left += 1
	else:
		right += 1
print('Yes' if min(left, right) < 2 else 'No')


n = int(input())
left = []
right = []
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		left.append(y)
	else:
		right.append(y)
if len(left) <= 1 or len(right) <= 1:
	print('yes')
else:
	print('no')


n = int(input())
(nx, px) = (0, 0)
for i in range(n):
	x = int(input().split()[0])
	if x > 0:
		px += 1
	else:
		nx += 1
print('Yes' if nx < 2 or px < 2 else 'No')


(nc, pc) = (0, 0)

def point(s):
	global pc
	global nc
	if s[0] != '-':
		nc += 1
	else:
		pc += 1
for i in range(int(input())):
	s = input()
	point(s)
if nc <= 1 or pc <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
count1 = 0
count2 = 0
for i in range(n):
	(x, y) = [int(i) for i in input().split()]
	if x > 0:
		count1 += 1
	else:
		count2 += 1
if count1 == 1 or count1 == 0 or count2 == 1 or (count2 == 0):
	print('Yes')
else:
	print('No')


n = int(input())
(t, l) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0 and y > 0:
		t += 1
	elif x < 0 and y <= 0:
		t += 1
	else:
		l += 1
if t == 0 and l != 0 or (l == 0 and t != 0):
	print('Yes')
elif t == 1 or l == 1:
	print('Yes')
else:
	print('No')


n = int(input())
otr = 0
pol = 0
m = []
for i in range(n):
	(a, b) = map(int, input().split())
	m.append(a)
for i in m:
	if i < 0:
		otr += 1
	elif i > 0:
		pol += 1
	if otr > 1 and pol > 1:
		print('NO')
		break
else:
	print('YES')


left = 0
right = 0
for i in range(int(input())):
	if int(input().split()[0]) > 0:
		right += 1
	else:
		left += 1
if left <= 1 or right <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
sleva = 0
sprava = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		sleva += 1
	if x > 0:
		sprava += 1
if sprava == 1 or sleva == 1 or sleva == 0 or (sprava == 0):
	print('YES')
else:
	print('NO')


n = int(input())
m = 0
p = 0
for i in range(n):
	mas = [int(i) for i in input().split()]
	if mas[0] > 0:
		p = p + 1
	if mas[0] < 0:
		m = m + 1
if m == 1 or p == 1 or m == n or (p == n):
	print('Yes')
else:
	print('No')


n = int(input())
(c, d) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		c += 1
	else:
		d += 1
print('YES' if min(c, d) < 2 else 'NO')


a = b = 0
for _ in range(int(input())):
	(x, _) = map(int, input().split())
	if x > 0:
		a += 1
	elif x < 0:
		b += 1
if a <= 1 or b <= 1:
	print('Yes', end='')
else:
	print('No', end='')


import itertools

def main():
	n = int(input())
	d = []
	for i in range(n):
		d.append([int(v) for v in input().split()])
	dp = [dd for dd in d if dd[0] > 0]
	dn = [dd for dd in d if dd[0] < 0]
	if len(dp) <= 1:
		print('YES')
	elif len(dn) <= 1:
		print('YES')
	else:
		print('NO')
main()


n = int(input())
pos = 0
neg = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		pos += 1
	else:
		neg += 1
if pos <= 1 and neg >= 1 or (neg <= 1 and pos >= 1):
	print('yes')
else:
	print('no')


def countmin(lis):
	count = 0
	for (i, j) in lis:
		if i < 0:
			count += 1
	return count

def countmax(lis):
	count = 0
	for (i, j) in lis:
		if i > 0:
			count += 1
	return count
arr = []
for i in range(int(input())):
	(n, k) = map(int, input().split())
	tup = (n, k)
	arr.append(tup)
if all((i > 0 for (i, j) in arr)):
	print('Yes')
elif all((i < 0 for (i, j) in arr)):
	print('Yes')
elif countmin(arr) == 1:
	print('Yes')
elif countmax(arr) == 1:
	print('Yes')
else:
	print('No')


n = int(input())
s1 = 0
s2 = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		s1 = s1 + 1
	else:
		s2 = s2 + 1
if s1 > 1 and s2 > 1:
	print('No')
else:
	print('Yes')


n = int(input())
(positive_cnt, negative_cnt) = (0, 0)
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		positive_cnt += 1
	else:
		negative_cnt += 1
if positive_cnt <= 1 or negative_cnt <= 1:
	print('YES')
else:
	print('NO')


t = int(input())
ps = [tuple(map(int, input().split())) for _ in range(t)]
p = sum((x > 0 for (x, y) in ps))
n = sum((x < 0 for (x, y) in ps))
if 1 in {p, n} or t in {p, n}:
	print('Yes')
else:
	print('No')


(x, xn) = (0, 0)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a < 0:
		xn += 1
	else:
		x += 1
if min(x, xn) <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
c = 0
for i in range(n):
	(x, y) = map(int, input().split())
	c += x > 0
if c >= 2:
	c = n - c
print('Yes' if c < 2 else 'No')


(c, d) = (0, 0)
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if l[0] < 0:
		c += 1
	elif l[0] > 0:
		d += 1
if c == 1 or d == 1:
	print('Yes')
elif c == 0 or d == 0:
	print('Yes')
else:
	print('No')


n = int(input())
d = 0
e = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		d += 1
	elif x < 0:
		e += 1
YES = 'YES'
NO = 'NO'
if d == 0 or d == 1 or e == 0 or (e == 1):
	print(YES)
else:
	print(NO)


read = lambda : map(int, input().split())
n = int(input())
cnt1 = cnt2 = 0
for i in range(n):
	(x, y) = read()
	if x < 0:
		cnt1 += 1
	else:
		cnt2 += 1
print('Yes' if min(cnt1, cnt2) <= 1 else 'No')


import sys
import os
import math
import re
n = int(input())
onSide = sum((int(input().split()[0]) > 0 for i in range(n)))
if onSide <= 1 or onSide >= n - 1:
	print('YES')
else:
	print('NO')


n = int(input())
l = []
r = []
for _ in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		l.append((x, y))
	if x > 0:
		r.append((x, y))
if len(l) <= 1 or len(r) <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l1 = []
l2 = []
l3 = []
for i in range(n):
	(p, q) = map(int, input().split())
	if p > 0:
		l1.append([p, q])
	if p < 0:
		l2.append([p, q])
if len(l1) > 1 and len(l2) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
ctleft = 0
ctright = 0
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	if x < 0:
		ctleft += 1
	else:
		ctright += 1
print('YNeos'[not (ctright < 2 or ctleft < 2)::2])


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
a = ii()
(f1, f2) = (0, 0)
for i in range(a):
	if int(input().split()[0]) > 0:
		f1 += 1
	else:
		f2 += 1
if f1 < 2 or f2 < 2:
	print('YES')
else:
	print('NO')


n = int(input())
l = [int(input().split()[0]) for i in range(n)]
c1 = len([0 for x in l if x > 0])
if c1 <= 1 or c1 >= n - 1:
	print('Yes')
else:
	print('No')


(countN, countP) = (0, 0)
for i in range(int(input())):
	if int(input().split()[0]) < 0:
		countN += 1
	else:
		countP += 1
print('YES' if min(countP, countN) is 0 or min(countP, countN) is 1 else 'NO')


t = int(input())
countp = 0
countn = 0
for i in range(t):
	(n, k) = input().strip().split(' ')
	(n, k) = [int(n), int(k)]
	if n > 0:
		countp = countp + 1
	if n < 0:
		countn = countn + 1
if countp == 1 or countn == 1:
	print('Yes')
elif countp > 0 and countn == 0 or (countn > 0 and countp == 0):
	print('Yes')
else:
	print('No')


import sys
n = int(input())
ne = 0
po = 0
for i in range(n):
	arr = list(map(int, input().split()))
	if arr[0] > 0:
		po += 1
	else:
		ne += 1
if po == 0 or ne == 0:
	print('Yes')
	sys.exit(0)
if po == 1 or ne == 1:
	print('Yes')
else:
	print('No')


n = int(input())
lijevo = 0
desno = 0
for i in range(n):
	s = str(input())
	l = s.split(' ')
	if int(l[0]) > 0:
		desno += 1
	else:
		lijevo += 1
if lijevo > 1 and desno > 1:
	print('No')
else:
	print('Yes')


import math

def get_int_vector():
	return [int(x) for x in input().split()]
n = int(input())
(left, right) = (0, 0)
for _ in range(n):
	(x, y) = get_int_vector()
	if x < 0:
		left += 1
	else:
		right += 1
if left <= 1 or right <= 1:
	print('Yes')
else:
	print('No')


a = 0
b = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		a += 1
	else:
		b += 1
if a == 1 or b == 1 or (a > 1 and b == 0) or (b > 1 and a == 0):
	print('yes')
else:
	print('no')


q = int(input())
e = 0
r = 0
for i in range(q):
	w = input().split()
	if int(w[0]) < 0:
		e += 1
	else:
		r += 1
if e == 1 or r == 1 or e == 0 or (r == 0):
	print('Yes')
else:
	print('No')


n = int(input())
coords = []
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	coords.append(x)
pol = 0
otr = 0
for i in range(n):
	if coords[i] > 0:
		pol += 1
	else:
		otr += 1
if min([otr, pol]) > 1:
	print('No')
else:
	print('Yes')


n = int(input())
m = 0
l = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0:
		m += 1
	else:
		l += 1
if m == 1 or m == 0 or l == 0 or (l == 1):
	print('yes')
else:
	print('no')


R = lambda : map(int, input().split())
n = int(input())
left = 0
right = 0
for i in range(n):
	(a, b) = R()
	if a > 0:
		right += 1
	if a < 0:
		left += 1
if min(left, right) < 2:
	print('Yes')
else:
	print('No')


LeftSide = RightSide = 0
for i in range(int(input())):
	m = list(map(int, input().split()))
	if m[0] < 0:
		LeftSide += 1
	else:
		RightSide += 1
	if LeftSide > 1 and RightSide > 1:
		print('NO')
		exit()
print('YES')


cp = 0
cn = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		cp += 1
	else:
		cn += 1
if cp <= 1 or cn <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
x = []
for i in range(n):
	(xi, yi) = [int(i) for i in input().split()]
	x.append(xi)
x.sort()
x1 = x[1:]
x2 = x[:n - 1]
X1 = 1
X2 = 1
for j in x1:
	if j <= 0:
		X1 = 0
for r in x2:
	if r >= 0:
		X2 = 0
if X1 == 1 or X2 == 1:
	print('YES')
else:
	print('NO')


n = int(input())
ox = []
oy = []
for i in range(n):
	(x, y) = map(int, input().split())
	ox.append(x)
	oy.append(y)
pos = 0
neg = 0
for i in ox:
	if i < 0:
		neg += 1
	else:
		pos += 1
if pos >= 2 and neg >= 2:
	print('No')
else:
	print('YES')


n = int(input())
a = 0
y1 = 0
for i in range(n):
	(x, y) = [int(i) for i in input().split()]
	if x < 0:
		a += 1
	else:
		y1 += 1
if a <= 1 or y1 <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
xcor = []
for i in range(n):
	(a, b) = map(int, input().split())
	xcor.append(a)
(dan, sdan) = (1, 1)
for i in range(n):
	if dan == 0 and xcor[i] < 0:
		sdan = 0
		break
	elif xcor[i] < 0 and dan:
		dan = 0
if sdan:
	print('Yes')
	quit()
(bam, sbam) = (1, 1)
for i in range(n):
	if bam == 0 and xcor[i] > 0:
		sbam = 0
		break
	elif xcor[i] > 0 and bam:
		bam = 0
if sbam:
	print('Yes')
	quit()
print('No')


n = int(input())
(xp, xn) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		xp += 1
	if x < 0:
		xn += 1
if (xn == 0 or xn == 1) or (xp == 0 or xp == 1):
	print('Yes')
else:
	print('No')


n = int(input())
L = []
for i in range(n):
	(p, k) = map(int, input().strip().split())
	L.append(p)
droite = 0
gauche = 0
i = 0
while (droite < 2 or gauche < 2) and i < n:
	if L[i] > 0:
		droite = droite + 1
	else:
		gauche = gauche + 1
	i = i + 1
if gauche < 2 or droite < 2:
	print('Yes')
else:
	print('No')


n = int(input())
q12 = q34 = 0
for i in range(n):
	s = input().split()
	(x, y) = (int(s[0]), int(s[1]))
	if abs(x) == x:
		q12 += 1
	else:
		q34 += 1
print('Yes' if q12 <= 1 or q34 <= 1 else 'No')


test = int(input())
cont = 0
cont1 = 0
for i in range(test):
	point = list(map(int, input().split()))
	if point[0] <= 0:
		cont += 1
	if point[0] > 0:
		cont1 += 1
if cont == 1 or cont1 == 1:
	print('YES')
if cont == 0 or cont1 == 0:
	print('YES')
if cont > 1 and cont1 > 1:
	print('NO')


import sys

def main():
	t = list(map(int, sys.stdin.read().strip().split()[1::2]))
	(c1, c2) = (0, 0)
	for i in t:
		if i > 0:
			c1 += 1
		else:
			c2 += 1
	return ('No', 'Yes')[c1 < 2 or c2 < 2]
print(main())


from functools import lru_cache
a = int(input())
left = 0
right = 0
for i in range(a):
	(x, y) = tuple(map(int, input().split()))
	if x < 0:
		left += 1
	else:
		right += 1
if left <= 1 or right <= 1:
	print('yes')
else:
	print('no')


n = int(input())
p = 0
for i in range(n):
	p += int(int(input().split()[0]) > 0)
print(['nO', 'yeS'][int(p <= 1 or p >= n - 1)])


def checke_quater(x, y):
	if x >= 0 and y >= 0:
		return 1
	elif x <= 0 and y >= 0:
		return 2
	elif x <= 0 and y <= 0:
		return 3
	elif x >= 0 and y <= 0:
		return 4
	else:
		return None

def check_adjust_plan(first_plan, second_plan):
	if abs(first_plan - second_plan) == 2:
		return True
	return False

def check_possibility(dict_point):
	first_quarter = len(dict_point[1])
	second_quarter = len(dict_point[2])
	third_quarter = len(dict_point[3])
	fourth_quarter = len(dict_point[4])
	if first_quarter > 0 and second_quarter > 0 and (third_quarter > 0) and (fourth_quarter > 0):
		return False
	elif first_quarter > 1 and third_quarter > 1:
		return False
	elif second_quarter > 1 and fourth_quarter > 1:
		return False
	elif first_quarter + fourth_quarter > 1 and second_quarter + third_quarter > 1:
		return False
	return True
dic_store_point = {}
dic_store_point[1] = []
dic_store_point[2] = []
dic_store_point[3] = []
dic_store_point[4] = []
n = int(input())
points = []
for i in range(n):
	points = list(map(int, input().strip().split(' ')))
	dic_store_point[checke_quater(points[0], points[1])].append(points)
if check_possibility(dic_store_point):
	print('Yes')
else:
	print('No')


n = int(input())
a = [[int(x) for x in input().split()] for _ in range(n)]
l = filter(lambda x: x[0] < 0, a)
r = filter(lambda x: x[0] > 0, a)
if len(list(l)) in [0, 1] or len(list(r)) in [0, 1]:
	print('YES')
else:
	print('NO')


n = int(input())
l = []
li = []
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		l.append(a)
	else:
		li.append(a)
if len(l) == 1 or len(li) == 1:
	print('YES')
elif len(l) == n or len(li) == n:
	print('YES')
else:
	print('NO')


n = int(input())
x = []
t = 0
f = 0
v = 1
for i in range(n):
	s = list(map(int, input().split()))
	x.append(s[0])
for i in range(n):
	if x[i] > 0:
		t += 1
	else:
		f += 1
	if t > 1 and f > 1:
		v = 0
		print('No')
		break
if v == 1:
	print('Yes')


NumPoints = int(input().strip())
Points = []
for i in range(NumPoints):
	Points.append([int(x) for x in input().strip().split(' ')])
NumPointsOnLeft = 0
NumPointsOnRight = 0
for i in range(NumPoints):
	if Points[i][0] < 0:
		NumPointsOnLeft += 1
	else:
		NumPointsOnRight += 1
if NumPointsOnLeft <= 1 or NumPointsOnRight <= 1:
	print('Yes')
else:
	print('No')


from sys import stdin

def main():
	n = int(stdin.readline())
	rightCnt = 0
	for i in range(n):
		(x, y) = list(map(int, stdin.readline().strip().split()))
		if x > 0:
			rightCnt += 1
	print('Yes' if rightCnt == 1 or n - rightCnt == 1 or n == rightCnt or (rightCnt == 0) else 'No')
main()


n = int(input(''))
band = False
xx = 0
yy = 0
for i in range(n):
	cad = str(input(''))
	aux = cad.split(' ')
	n1 = int(aux[0])
	n2 = int(aux[1])
	if n1 < 0:
		xx += 1
	else:
		yy += 1
if xx == 0 or xx - 1 == 0 or yy == 0 or (yy - 1 == 0):
	band = True
if band is True:
	print('Yes')
else:
	print('No')


n = int(input())
(ans, bns) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		ans += 1
	elif a > 0:
		bns += 1
print('No' if ans > 1 and bns > 1 else 'Yes')


def sign(x):
	if x >= 0:
		return 1
	else:
		return -1
lt_zero = 0
gt_zero = 0
n = int(input())
for ii in range(n):
	(x, y) = (int(xx) for xx in input().split(sep=' '))
	if sign(x) == -1:
		lt_zero += 1
	else:
		gt_zero += 1
if lt_zero > gt_zero:
	if gt_zero > 1:
		print('No')
	else:
		print('Yes')
elif lt_zero > 1:
	print('No')
else:
	print('Yes')


x = int(input())
k = 0
m = 0
for i in range(x):
	(a, b) = map(int, input().split())
	if a < 0:
		k += 1
	if a > 0:
		m += 1
if k > 1 and m > 1:
	print('No')
else:
	print('Yes')


nve = 0
pve = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x < 0:
		nve += 1
	else:
		pve += 1
if nve <= 1 or pve <= 1:
	print('YES')
else:
	print('NO')


def lInt(d=' '):
	return [int(i) for i in input().split(d)]
(n, *_) = lInt()
l = 0
r = 0
for i in range(n):
	(x, y) = lInt()
	l += x < 0
	r += x > 0
print('Yes' if l <= 1 or r <= 1 else 'No')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	c = collections.Counter([True, False] + [LI()[0] < 0 for _ in range(n)])
	if min(c.values()) <= 2:
		return 'Yes'
	return 'No'
print(main())


n = int(input())
pos = 0
neg = 0
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	if a < 0:
		neg += 1
	if a > 0:
		pos += 1
if neg >= 2 and pos >= 2:
	print('no')
else:
	print('yes')


xs = [list(map(int, input().split()))[0] for _ in range(int(input()))]
np = sum([x > 0 for x in xs])
nn = sum([x < 0 for x in xs])
print('NO' if np > 1 and nn > 1 else 'YES')


def main():
	n = int(input())
	count_left = 0
	count_right = 0
	for _ in range(n):
		[x, y] = [int(_) for _ in input().split()]
		if x > 0:
			count_right += 1
		else:
			count_left += 1
	print('YES' if count_right < 2 or count_left < 2 else 'NO')
main()


n = int(input())
l = []
for i in range(n):
	l.append(list(input().split()))
a = 0
b = 0
for i in range(n):
	if int(l[i][0]) > 0:
		a += 1
	else:
		b += 1
if a > n - 2 or b > n - 2:
	print('YES')
else:
	print('NO')


import sys
n = int(input())
l = sum((1 for i in range(n) if int(input().split()[0]) > 0))
print('Yes' if n - l <= 1 or n - l >= n - 1 else 'No')


n = eval(input())
i = 0
r = []
f1 = 0
f2 = 0
s1 = True
s2 = True
while i < n:
	a = input().split(' ')
	b = int(a[0])
	if b > 0:
		f1 += 1
	else:
		f2 += 1
	if f1 > 1:
		s1 = False
	if f2 > 1:
		s2 = False
	i = i + 1
if s1 or s2:
	print('Yes')
else:
	print('No')


positive_count = 0
negative_count = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a < 0:
		negative_count = negative_count + 1
	else:
		positive_count = positive_count + 1
if positive_count < 2 or negative_count < 2:
	print('yes')
else:
	print('no')


def main():
	n = int(input().strip())
	left = 0
	right = 0
	for i in range(0, n):
		(x, y) = input().strip().split()
		x = int(x)
		if x > 0:
			right += 1
		if x < 0:
			left += 1
		if right > 1 and left > 1:
			print('No')
			return
	print('Yes')
main()


n = int(input())
cnt = 0
cnt2 = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		cnt += 1
	if a > 0:
		cnt2 += 1
if cnt == 0 or cnt2 == 0:
	print('yes')
elif cnt > 1 and cnt2 > 1:
	print('no')
else:
	print('yes')


n = int(input())
(p, nn) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		p += 1
	else:
		nn += 1
if p > 1 and nn > 1:
	print('NO')
elif p <= 1 or nn <= 1:
	print('YES')


def run():
	numbers = input().strip()
	puntos = []
	i = 0
	d = 0
	res = 0
	for x in range(int(numbers)):
		p = input().strip()
		coor = p.split(' ')
		if int(coor[0]) < 0:
			i += 1
		else:
			d += 1
	if d == 0 or i == 0:
		res = 1
	if d - 1 == 0 or i - 1 == 0:
		res = 1
	if res:
		print('Yes')
	else:
		print('No')
run()


ans1 = 0
ans2 = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		ans1 += 1
	if x < 0:
		ans2 += 1
if ans1 == 1 or ans2 == 1 or ans1 == 0 or (ans2 == 0):
	print('Yes')
else:
	print('No')


f = lambda : map(int, input().split())
p = n = 0
x = int(input())
while x:
	(a, b) = f()
	p += a > 0
	n += a < 0
	x -= 1
print('YES' if p <= 1 or n <= 1 else 'NO')


(l, r) = (0, 0)
T = int(input())
for t in range(T):
	(x, y) = map(int, input().split())
	if x < 0:
		l += 1
	else:
		r += 1
if l <= 1 or r <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
pxcnt = 0
nxcnt = 0
for i in range(n):
	(x, y) = map(int, input().split(' '))
	if x >= 0:
		pxcnt += 1
	else:
		nxcnt += 1
if pxcnt < 2 and nxcnt > 0 or (nxcnt < 2 and pxcnt > 0):
	print('Yes')
else:
	print('No')


from collections import Counter

def sign(a):
	if a > 0:
		return 1
	return -1
n = int(input())
points = list((tuple(map(int, input().split())) for i in range(n)))
ans = sorted(Counter([sign(x[0]) for x in points]).values())
if ans == [1, n - 1] or ans == [n]:
	print('Yes')
else:
	print('No')


n = input()
new = []
for i in range(int(n)):
	f = [int(i) for i in input().strip().split(' ')]
	new.append(f[0])
(s, t) = (0, 0)
for i in range(int(n)):
	if new[i] < 0:
		t += 1
	else:
		s += 1
if t >= 2 and s >= 2:
	print('No')
else:
	print('Yes')


n = int(input())
dotes = []
for i in range(n):
	dotes.append([int(j) for j in input().split()])
dotes.sort()
i = 0
while i < n and dotes[i][0] < 0:
	i += 1
if i > 1 and n - i > 1:
	print('No')
else:
	print('Yes')


n = int(input())
pos = 0
neg = 0
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	if x < 0:
		neg += 1
	else:
		pos += 1
if pos == 1 and neg >= 1:
	print('Yes')
elif neg == 1 and pos >= 1:
	print('Yes')
elif pos == 0 and neg > 0:
	print('Yes')
elif neg == 0 and pos > 0:
	print('Yes')
else:
	print('No')


n = int(input())
left = 0
right = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a > 0 and b > 0 or (a > 0 and b < 0) or (a > 0 and b == 0):
		right += 1
	if a < 0 and b < 0 or (a < 0 and b > 0) or (a < 0 and b == 0):
		left += 1
if left <= 1 or right <= 1:
	print('YES')
else:
	print('NO')


n = int(input())
l = []
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		l += [y]
if len(l) <= 1 or len(l) >= n - 1:
	print('YES')
else:
	print('NO')


n = int(input())
pts = []
for i in range(n):
	pts.append(int(input().split()[0]))
pos = [i for i in pts if i > 0]
neg = [i for i in pts if i < 0]
if len(neg) <= 1 or len(pos) <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
l = len(list(filter(lambda x: x < 0, [(lambda x: x[0])(list(map(int, input().split()))) for i in range(n)])))
print(['No', 'Yes'][min(l, n - l) < 2])


def solution():
	n = int(input())
	left_count = 0
	right_count = 0
	for l in range(n):
		inp = [int(a) for a in input().split(' ')]
		if inp[0] <= 0:
			left_count += 1
		else:
			right_count += 1
	if left_count > 1 and right_count > 1:
		print('NO')
		return
	else:
		print('YES')
		return
solution()


r = 0
l = 0
o = 0
for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if a < 0:
		l += 1
	elif a > 0:
		r += 1
	elif a == 0 and b == 0:
		o += 1
if min(r, l) <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
output = True
(l, r) = (0, 0)
for _ in range(n):
	(x, y) = map(int, input().split())
	if x < 0:
		l += 1
	else:
		r += 1
	if l >= 2 and r >= 2:
		output = False
		break
print('Yes' if output else 'No')


def main():
	n = int(input())
	x = []
	pos = 0
	neg = 0
	for i in range(n):
		(a, b) = map(int, input().strip().split())
		x.append(a)
	for i in x:
		if i > 0:
			pos += 1
		elif i < 0:
			neg += 1
	if pos == 1 or neg == 1 or pos == 0 or (neg == 0):
		print('yes')
	else:
		print('no')
main()


N = int(input())
lc = 0
rc = 0
for _ in range(N):
	(x, y) = map(int, input().split())
	if x < 0:
		lc += 1
	else:
		rc += 1
if rc <= 1 or lc <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
countr = 0
countl = 0
for x in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		countl += 1
	if a > 0:
		countr += 1
if countr == 1 or countr == 0 or countl == 1 or (countl == 0):
	print('Yes')
else:
	print('No')


n = int(input())
pos = 0
neg = 0
for ii in range(n):
	(x, y) = [int(j) for j in input().split()]
	if x > 0:
		pos += 1
	if x < 0:
		neg += 1
if pos <= 1 or neg <= 1:
	print('Yes')
else:
	print('No')


a = 0
b = 0
for _ in range(int(input())):
	s = input()
	s = s.split()
	k = int(s[0])
	if k > 0:
		a = a + 1
	else:
		b = b + 1
if a == 1 or b == 1 or a == 0 or (b == 0):
	print('Yes')
else:
	print('No')


n = int(input())
(Right, Left) = (0, 0)
for i in range(n):
	X = list(map(int, input().split()))
	if X[0] < 0:
		Left += 1
	else:
		Right += 1
print('YES' if Right in (1, 0) or Left in (1, 0) else 'NO')


left = 0
right = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 0:
		right += 1
	else:
		left += 1
if left >= 2 and right >= 2:
	print('No')
else:
	print('Yes')


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
a = 0
b = 0
for i in range(n):
	(c, d) = M()
	if c > 0:
		a += 1
	if c < 0:
		b += 1
if a <= 1 or b <= 1:
	print('Yes')
else:
	print('No')


a = int(input())
e = []
q = []
for i in range(a):
	(b, c) = input().split()
	(b, c) = (int(b), int(c))
	if b > 0:
		e.append(b)
	else:
		q.append(b)
if len(e) <= len(q):
	if len(e) > 1:
		print('No')
	else:
		print('Yes')
elif len(q) > 1:
	print('No')
else:
	print('Yes')


def side(x):
	if x > 0:
		return True
	else:
		return False
n = int(input())
li = []
for i in range(n):
	(x, y) = map(int, input().split())
	li.append(side(x))
falsecount = 0
truecount = 0
for x in li:
	if x == True:
		truecount += 1
	else:
		falsecount += 1
if min(falsecount, truecount) > 1:
	print('No')
else:
	print('Yes')


t = int(input())
(v1, v2) = (0, 0)
for i in range(t):
	(x, y) = input().split()
	if int(x) < 0:
		v1 += 1
	elif int(x) > 0:
		v2 += 1
if v1 == 0 or v2 == 0:
	print('Yes')
else:
	v1 -= 1
	v2 -= 1
	if v1 > 0:
		if v2 == 0:
			print('Yes')
		else:
			print('No')
	elif v1 == 0:
		print('Yes')


left = 0
right = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x < 0:
		left += 1
	if x > 0:
		right += 1
	if left > 1 and right > 1:
		print('NO')
		break
else:
	print('YES')


(x, n, p) = (int(input()), 0, 0)
b = list()
for i in range(x):
	(a, c) = map(int, input().split())
	b.append(a)
for i in b:
	if i < 0:
		n += 1
	else:
		p += 1
print('Yes' if n <= 1 or p <= 1 else 'No')


import sys
cases = int(sys.stdin.readline())
points = []
for i in range(0, cases):
	point = sys.stdin.readline().strip().split(' ')
	points.append((int(point[0]), int(point[1])))
side_a = 0
side_b = 0
for point in points:
	if point[0] < 0:
		side_a = side_a + 1
	else:
		side_b = side_b + 1
if side_a == 0 or side_a == 1 or side_b == 0 or (side_b == 1):
	print('Yes')
else:
	print('No')


z = int(input(''))
n = p = 0
for i in range(z):
	x = int(input('').split(' ')[0])
	if x >= 0:
		p += 1
	else:
		n += 1
if p >= 1 and n == 0 or (p == 0 and n > 0) or n == 1 or (p == 1):
	print('YES')
else:
	print('NO')


n = int(input())
(m, p) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	if a < 0:
		m += 1
	else:
		p += 1
if m < 2 or p < 2:
	print('Yes')
else:
	print('No')


a = int(input())
l = []
for i in range(a):
	b = input().split()
	b = list(map(int, b))
	l.append(b[0])
count = 0
for k in l:
	if k < 0:
		count += 1
if count >= a - 1 or count <= 1:
	print('YES')
else:
	print('NO')


cnt = [0, 0]
for _ in range(int(input())):
	cnt[input().startswith('-')] += 1
print(('Yes', 'No')[cnt[0] > 1 < cnt[1]])


t = int(input())
countp = 0
countn = 0
for i in range(t):
	(x, y) = list(map(int, input().split()))
	if x > 0:
		countp += 1
	else:
		countn += 1
if countp <= 1 or countn <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
(cnt_pos, cnt_neg) = (0, 0)
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] < 0:
		cnt_neg += 1
	elif x[0] > 0:
		cnt_pos += 1
if min(cnt_pos, cnt_neg) > 1:
	print('No')
else:
	print('Yes')


import sys
import math
import bisect
import itertools

def main():
	A = [0] * 2
	for _ in range(int(input())):
		(x, y) = map(int, input().split())
		if x < 0:
			A[0] += 1
		elif x > 0:
			A[1] += 1
	ans = False
	if A[0] <= 1:
		ans = True
	elif A[1] <= 1:
		ans = True
	if ans:
		print('Yes')
	else:
		print('No')
main()


t = int(input())
cnt = 0
cnt1 = 0
for i in range(t):
	(m, n) = map(int, input().split())
	if m > 0:
		cnt += 1
	if m < 0:
		cnt1 += 1
if cnt == t or cnt == t - 1 or cnt == 0 or (cnt == 1):
	print('Yes')
else:
	print('No')


T = int(input())
d = {1: 0, -1: 0}
for _ in range(T):
	(a, b) = map(int, input().split())
	d[a // abs(a)] += 1
if any([d[1] <= 1, d[-1] <= 1]):
	print('Yes')
else:
	print('No')


import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda : list(map(int, input().split()))

def printARR(arr):
	for e in arr:
		print(e, end=' ')
	print()

def main():
	n = I()
	(l, r) = (0, 0)
	for _ in range(n):
		(x, y) = M()
		if x < 0:
			l += 1
		if x > 0:
			r += 1
	if l <= 1 or r <= 1:
		print('Yes')
	else:
		print('No')
tc = 1
for _ in range(tc):
	main()


n = int(input())
l = 0
for k in range(n):
	a = [int(q) for q in input().strip().split()]
	if a[0] > 0:
		l += 1
if l == 0 or l == 1 or l == n or (l == n - 1):
	print('Yes')
else:
	print('No')


catidad = str(input(''))
izquierda = 0
derecha = 0
respuesta = 0
puntos = []
for i in range(int(catidad)):
	coor = input().strip()
	aux = coor.split(' ')
	tupla = (aux[0], aux[1])
	puntos.append(tupla)
for x in range(int(catidad)):
	if int(puntos[x][0]) < 0:
		izquierda += 1
	else:
		derecha += 1
if derecha == 0 or izquierda == 0:
	respuesta = 1
if derecha - 1 == 0 or izquierda - 1 == 0:
	respuesta = 1
if respuesta == 1:
	print('Yes')
else:
	print('No')


tc = int(input().strip())
(p, q) = (0, 0)
for _ in range(tc):
	(a, b) = [int(i) for i in input().strip().split(' ')]
	if a > 0:
		p += 1
	else:
		q += 1
if p == 0 or q == 0:
	print('Yes')
elif p == 1 or q == 1:
	print('Yes')
else:
	print('No')


plus = 0
minus = 0
for i in range(int(input())):
	if str(input())[0] == '-':
		minus += 1
	else:
		plus += 1
if plus <= 1 or minus <= 1:
	print('YES')
else:
	print('NO')


def solve():
	n = int(input())
	(ct, n2) = (0, n)
	while n2 > 0:
		x = tuple(map(int, input().split()))
		if x[0] < 0:
			ct += 1
		n2 -= 1
	if ct <= 1 or ct >= n - 1:
		print('Yes')
	else:
		print('No')
solve()


p = q = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x < 0:
		p += 1
	else:
		q += 1
print('YES' if p < 2 or q < 2 else 'NO')


from collections import defaultdict
import math
n = int(input())
po = 0
ne = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x > 0:
		po += 1
	else:
		ne += 1
if min(po, ne) < 2:
	print('Yes')
else:
	print('No')


x = [int(input().split()[0]) for _ in range(int(input()))]
x = [i // abs(i) for i in x]
print('Yes' if min(x.count(-1), x.count(1)) < 2 else 'No')


n = int(input())
maior = 0
menor = 0
for i in range(0, n):
	(x, y) = map(int, input().split())
	if x < 0:
		maior += 1
	elif x > 0:
		menor += 1
if maior <= 1 or menor <= 1:
	print('Yes')
else:
	print('No')


n = int(input())
coords = []
for i in range(n):
	coords.append(list(map(int, input().split())))
negative = 0
positive = 0
for i in range(n):
	if coords[i][0] < 0:
		negative += 1
	else:
		positive += 1
if negative == 1 or positive == 1 or positive == 0 or (negative == 0):
	print('Yes')
else:
	print('No')