#! /usr/bin/python3 from sys import stderr def read(f): return f(input()) def readlist(f): return [f(x) for x in input().split()] n = read(int) x0, y0 = readlist(int) x1, y1 = readlist(int) nx = y1 - y0 ny = x0 - x1 nc = nx * x0 + ny * y0 line = (nx == 0 or ny == 0) for _ in range(2, n): if not line: break x, y = readlist(int) if nx * x + ny * y != nc: line = False break print("YES" if line else "NO")