#!/bin/python import sys n = int(raw_input().strip()) yes = True slope = None for a0 in xrange(n): x,y = raw_input().strip().split(' ') x,y = [int(x),int(y)] if x == 0: y = 0 if slope is None: slope = (x ,y) else: if (x, y) != slope: yes = False if yes: print "YES" else: print "NO"