import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Double m; static double c; static int last; public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int x1 = in.nextInt(); int y1 = in.nextInt(); int x2 = in.nextInt(); int y2 = in.nextInt(); if(n==2){ System.out.println("YES"); } if(x1!=x2){ m = (double)((y2-y1)/(x2-x1)); c = y1-(m*x1); } else last = x1; for(int a0 = 0; a0 < n-2; a0++){ int x = in.nextInt(); int y = in.nextInt(); if(onLine(x,y)==false) { System.out.println("NO"); break; } if(a0==n-3){ System.out.println("YES"); } } } public static boolean onLine(int x,int y ){ if(m!=null){ if(y==(m*x)+c) return true; else return false; } else{ if(x==last) return true; else return false; } } }