#include <bits/stdc++.h>
using namespace std;
long long n, k;
pair<long long, long long> a[200005];
pair<long long, long long> b[200005];
int main() {
  srand((unsigned)time(NULL));
  scanf("%I64d", &n);
  for (long long i = 1; i <= n; i++)
    scanf("%I64d%I64d", &a[i].first, &a[i].second);
  if (n <= 3) {
    puts("YES");
    return 0;
  }
  for (long long i = 1; i <= 300; i++) {
    long long res1 = (rand() % n) + 1;
    long long res2 = (rand() % n) + 1;
    while (res1 == res2) res2 = (rand() % n) + 1;
    long long t = 0;
    for (long long j = 1; j <= n; j++) {
      if (j == res1 || j == res2) continue;
      long long x1 = a[j].first - a[res1].first,
                y1 = a[j].second - a[res1].second,
                x2 = a[res2].first - a[res1].first,
                y2 = a[res2].second - a[res1].second;
      if (x1 * y2 != x2 * y1) b[t++] = a[j];
    }
    if (t <= 2) {
      puts("YES");
      return 0;
    }
    bool f = true;
    for (long long j = 2; j < t; j++) {
      long long x1 = b[j].first - b[0].first, y1 = b[j].second - b[0].second,
                x2 = b[1].first - b[0].first, y2 = b[1].second - b[0].second;
      if (x1 * y2 != x2 * y1) {
        f = false;
        break;
      }
    }
    if (f) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
