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[][] a = new int[n][2]; for(int a0 = 0; a0 < n; a0++){ int x = in.nextInt(); int y = in.nextInt(); a[a0][0] = x + 1; a[a0][1] = y + 1; } boolean hLine = true; int constant = a[0][0]; for (int i = 1; i < n; i++) { if (constant != a[i][0]) { hLine = false; break; } } if (hLine) { System.out.println("YES"); return; } boolean vLine = true; constant = a[0][1]; for (int i = 1; i < n; i++) { if (constant != a[i][1]) { vLine = false; break; } } if (vLine) { System.out.println("YES"); return; } double oldSlope = a[0][1] - a[1][1] / a[0][0] - a[1][0]; boolean slope = true; for (int i = 2; i < n; i++) { if (oldSlope == a[i - 1][1] - a[i][1] / a[i - 1][0] - a[i][0]) { continue; } else { slope = false; break; } } System.out.println(slope?"YES":"NO"); } }