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()); int[] xs = new int[n]; int[] ys = new int[n]; 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]); xs[a0] = x; ys[a0] = y; } bool result = true; for (int i = 2; i < xs.Length; i++) { var left = (xs[0]- xs[i])*(ys[1]-ys[i]); var right = (xs[1] - xs[i]) * (ys[0] - ys[i]); if (left != right) { result = false; break; } } Console.WriteLine(result ? "YES" : "NO"); } }