using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(string[] args) { //(x - x1) / (x2 - x1) = (y - y1) / (y2 - y1) int n = Convert.ToInt32(Console.ReadLine()); int[] a = new int[10]; int[] b = new int[10]; int pointx = 0; int pointy = 0; int count1 = 0; int count2 = 0; int countz = 0; for (int a0 = 0; a0 < n; a0++) { string[] tokens_x = Console.ReadLine().Split(' '); int x = Convert.ToInt32(tokens_x[0]); int y = Convert.ToInt32(tokens_x[1]); a[a0] = x; b[a0] = y; if (a0 == 0) { pointx = x; pointy = y; } if (pointx == x) { count1++; } if (pointy == y) { count2++; } } for (int i = 0; i < n - 2; i++) { //(x - x1) / (x2 - x1) = (y - y1) / (y2 - y1) try { if ((a[i] - a[i + 1]) / (a[i + 2] - a[i + 1]) == (b[i] - b[i + 1]) / (b[i + 2] - b[i + 1])) { countz++; } } catch (Exception e ) { countz++; } } if (countz == n -2 && count2 == n || count1 == n) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }