using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] tokens_x = Console.ReadLine().Split(' '); int x1 = Convert.ToInt32(tokens_x[0]); int y1 = Convert.ToInt32(tokens_x[1]); tokens_x = Console.ReadLine().Split(' '); int x2 = Convert.ToInt32(tokens_x[0]); int y2 = Convert.ToInt32(tokens_x[1]); double slope = 0; var noSlope = false; if (x1 != x2) { slope = (y2 - y1) / (double)(x2 - x1); } else { noSlope = true; } var b = y1 - (slope * x1); var isLine = true; var points = 2; while (points < n && isLine) { tokens_x = Console.ReadLine().Split(' '); x1 = Convert.ToInt32(tokens_x[0]); y1 = Convert.ToInt32(tokens_x[1]); if (noSlope) { if (x1 != x2) { isLine = false; } } else if (y1 != ((slope * x1) + b)) { isLine = false; } points++; } if (isLine) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }