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 x1 = in.nextInt(); int y1 = in.nextInt(); double slope = 0; for(int a0 = 1; a0 < n; a0++){ int x = in.nextInt(); int y = in.nextInt(); if (a0 == 1){ if (x != x1) slope = (double)(y-y1)/(double)(x-x1); else slope = Double.MAX_VALUE; //System.out.println("Slope = " + slope); } else{ double slope1 = Double.MAX_VALUE; if (x != x1) slope1 = (double)(y-y1)/(double)(x-x1); else if (x == x1 && y == y1) slope1 = 1; if (slope != slope1){ System.out.println("NO"); return; } } } System.out.println("YES"); } }