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(); int[] x = new int[n]; int[] y = new int[n]; for(int a0 = 0; a0 < n; a0++) { x[a0] = in.nextInt(); y[a0] = in.nextInt(); } boolean match = true; double slope = 0; boolean horizontal = false; for(int i = 0; i < n - 1; i++) { if(i == 0) { if(x[i + 1] - x[i] != 0) { slope = (y[i + 1] - y[i]) / (x[i + 1] - x[i]); } else { horizontal = true; } } else if(i > 0) { if(x[i + 1] - x[i] != 0) { double newSlope = (y[i + 1] - y[i]) / (x[i + 1] - x[i]); if(slope != newSlope) { match = false; break; } slope = newSlope; } else { if(!horizontal) { match = false; break; } } } } if(match) { System.out.println("YES"); } else { System.out.println("NO"); } } }