#include <bits/stdc++.h>
using namespace std;
long long n;
vector<pair<long long, long long>> a;
bool check() {
  vector<long long> f(n, 0);
  if (a[0].second == a[1].second) {
    for (long long i = 0; i < n; i++) {
      if (a[i].second == a[0].second) f[i] = 1;
    }
  } else if (a[0].first == a[1].first) {
    for (long long i = 0; i < n; i++) {
      if (a[i].first == a[0].first) f[i] = 1;
    }
  } else {
    for (long long i = 0; i < n; i++) {
      if ((a[i].second - a[0].second) * (a[1].first - a[0].first) ==
          (a[i].first - a[0].first) * (a[1].second - a[0].second)) {
        f[i] = 1;
      }
    }
  }
  long long k = -1, p = -1;
  for (long long i = 2; i < n; i++) {
    if (k == -1 and f[i] == 0) {
      k = i;
    } else if (f[i] == 0) {
      p = i;
    }
  }
  if (a[k].second == a[p].second) {
    for (long long i = 0; i < n; i++) {
      if (a[i].second == a[k].second) f[i] = 1;
    }
  } else if (a[k].first == a[p].first) {
    for (long long i = 0; i < n; i++) {
      if (a[i].first == a[k].first) f[i] = 1;
    }
  } else {
    for (long long i = 0; i < n; i++) {
      if ((a[i].second - a[k].second) * (a[p].first - a[k].first) ==
          (a[i].first - a[k].first) * (a[p].second - a[k].second)) {
        f[i] = 1;
      }
    }
  }
  return *min_element(f.begin(), f.end());
}
long long solve() {
  cin >> n;
  a.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  if (n <= 4) {
    return 1;
  }
  if (check()) {
    return 1;
  }
  swap(a[0], a[2]);
  if (check()) {
    return 1;
  }
  swap(a[1], a[2]);
  if (check()) {
    return 1;
  }
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  puts(solve() ? "YES" : "NO");
}
