import sys n = int(raw_input().strip()) x,y = raw_input().strip().split(' ') firstx,firsty = [int(x),int(y)] result = 'YES' main_slope = None for a0 in xrange(n-1): x,y = raw_input().strip().split(' ') x,y = [int(x),int(y)] if x-firstx != 0: slope = (y-firsty)/(x-firstx) else: slope = float('inf') if a0 == 0: main_slope = slope if slope != main_slope: result = 'NO' break print result