#!/bin/python3 import sys n = int(input().strip()) X = list() Y = list() for a0 in range(n): x,y = input().strip().split(' ') x,y = [int(x),int(y)] X.append(x) Y.append(y) success = True for i in range(2,n): tmp1 = (X[0]-X[1])*(Y[i]-Y[0]) tmp2 = (Y[0]-Y[1])*(X[i]-X[0]) if tmp1 != tmp2: success = False break if success == False: print("NO") else: print("YES")