#!/bin/python3 import sys def main(): n = int(input().strip()) if n == 2: print("YES") return pnts = [] for a0 in range(n): x,y = input().strip().split(' ') x,y = [int(x),int(y)] pnts.append([x,y]) [x1,y1] = pnts[0] [x2,y2] = pnts[1] horz = False vert = False b = 0 if x2-x1 == 0: vert = True m = x1 elif y2-y1 == 0: horz = True m = y1 else: m = (y2-y1)/(x2-x1) b = y1 - m*x1 found = True for p in pnts[2:]: if horz or vert: if horz and m != p[1]: found = False elif vert and m != p[0]: found = False else: if p[1] != (m*p[0]+b): found = False if found: print("YES") else: print("NO") main()