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 oldX = 0, oldY=0, slope=0, prevSlope=0; for(int a0 = 0; a0 < n; a0++){ int x = in.nextInt(); int y = in.nextInt(); if(a0 != 0) { if(x - oldX == 0) { slope = y - oldY; } else { slope = (y-oldY) / (x - oldX); } if(a0 != 1) { if(slope != prevSlope) { System.out.println("NO"); return; } } prevSlope = slope; oldX = x; oldY = y; } else { oldX = x; oldY = y; } } System.out.println("YES"); } }