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(); int x2 = in.nextInt(); int y2 = in.nextInt(); double slope = getSlope(x1,x2,y1,y2); double newSlope; for(int a0 = 2; a0 < n; a0++){ x1=x2; y1=y2; x2 = in.nextInt(); y2 = in.nextInt(); newSlope = getSlope(x1,x2,y1,y2); if (newSlope!=slope) { System.out.println("NO"); return; } } System.out.println("YES"); } private static double getSlope(int x1, int x2, int y1, int y2) { int rise = y2-y1; int run = x2-x1; if (rise==0) {return run;} if (run==0) {return rise;} return (double)(rise/run); }; }