n = int(input()) pts = [] for i in range(n): a, b = [int(s) for s in input().strip().split()] pts.append((a, b)) p1 = pts[0] p2 = pts[1] if (p1[0] == p2[0]): good = True for i in range(n): if not (pts[i][0] == p1[0]): good = False break; if good: print("YES") else: print("NO") else: slope = (p1[1] - p2[1]) / (p1[0] - p2[0]) k = p1[1] - p1[0] * slope good = True for i in range(n): if not (abs(pts[i][0] * slope + k - pts[i][1]) < 0.00001 ): good = False break if good and slope == 0: print("YES") else: print("NO")