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=0, y=0, prevX, prevY, slope=0, pSlope; boolean inLn = true; for(int a0 = 0; a0 < n; a0++){ if (a0 == 0) { x = in.nextInt(); y = in.nextInt(); continue; } prevX = x; prevY = y; x = in.nextInt(); y = in.nextInt(); pSlope = slope; if (y != prevY) slope = (x-prevX)/(y-prevY); else continue; if (a0 == 1) continue; if (pSlope != slope) { inLn = false; } } if (inLn) System.out.println("YES"); else System.out.println("NO"); } }