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 == 2){ System.out.println("YES"); } else { int count = 0; double slope = 0.0; double intercept = 0.0; int[][] inputArray = new int[n][2]; boolean isFlag = true; for(int i = 0; i < n; i++){ inputArray[i][0] = in.nextInt(); inputArray[i][1] = in.nextInt(); if (count > 2){ double newslope; double newintercept; try { newslope = (inputArray[i][1] - inputArray[i-1][1])/(inputArray[i][0] - inputArray[i-1][0]); newintercept = (inputArray[i][1] - newslope * inputArray[i][0]); } catch (Exception e){ newslope = Integer.MAX_VALUE; newintercept = Integer.MAX_VALUE; } if (newslope != slope || newintercept != intercept){ isFlag = false; break; } } else { if (count == 1){ try{ slope = (inputArray[i][1] - inputArray[i-1][1])/(inputArray[i][0] - inputArray[i-1][0]); intercept = (inputArray[i][1] - slope * inputArray[i][0]); } catch (Exception e){ slope = Integer.MAX_VALUE; intercept = Integer.MAX_VALUE; } } } count++; } if (isFlag){ System.out.println("YES"); } else { System.out.println("NO"); } } } }