#!/bin/python3 import sys xs = [] ys = [] others = [] n = int(input().strip()) for a0 in range(n): x,y = input().strip().split(' ') x,y = [int(x),int(y)] t = [x, y] if(x == 0 and y == 0): xs.append(t) ys.append(t) elif(x == 0 and y!= 0): ys.append(t) elif(x != 0 and y == 0): xs.append(t) else: others.append(t) if(len(others) > 0): print("NO") elif(len(xs) > 0 and len(ys) <= 1): if(len(ys) > 1): print("NO") elif(len(ys) == 1): if(ys[0][1] == 0): print("YES") else: print("NO") else: print("YES") elif(len(ys) > 0 and len(xs) <= 1): if(len(xs) > 1): print("NO") elif( len(xs) == 1 ): if( xs[0][0] == 0 ): print("YES") else: print("NO") else: print("YES")