import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); if(n<3) { System.out.println("YES"); return; } int xx[] = new int[2]; int yy[] = new int[2]; for(int a0 = 0; a0 < 2; a0++) { xx[a0] = in.nextInt(); yy[a0] = in.nextInt(); } int yc = yy[1] - yy[0]; int xc = xx[1] - xx[0]; int c = xx[0]*yc+yy[0]*xc; boolean b = true; for(int a0 = 2; a0 < n; a0++) { int x = in.nextInt(); int y = in.nextInt(); int tc = x*yc+y*xc; if(tc!=c) { b = false; break; } } if(b) { System.out.println("YES"); } else { System.out.println("NO"); } } }