#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using f64 = double;
using f80 = long double;
using pii = pair<int, int>;
using ptx = pair<i64, i64>;
vector<bool> f;
vector<ptx> pts;
int n;
static i64 ccw(const ptx &a, const ptx &b, const ptx &c) {
  return i64(a.first - c.first) * (b.second - c.second) -
         i64(a.second - c.second) * (b.first - c.first);
}
static void check(int a, int b) {
  f.resize(n);
  fill(begin(f), end(f), 0);
  for (int i = 0; i < n; ++i)
    if (ccw(pts[a], pts[b], pts[i]) == 0) f[i] = true;
  a = -1, b = -1;
  for (int i = 0; i < n && b == -1; ++i)
    if (!f[i]) {
      if (a == -1)
        a = i;
      else
        b = i;
    }
  if (a >= 0 && b >= 0) {
    for (int i = 0; i < n; ++i)
      if (ccw(pts[a], pts[b], pts[i]) == 0) f[i] = true;
  }
  if (a == -1 || b == -1 || *min_element(begin(f), end(f)) == 1) {
    cout << "YES\n";
    exit(0);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n;
  pts.resize(n);
  for (auto &i : pts) cin >> i.first >> i.second;
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  }
  sort(begin(pts), end(pts));
  sort(begin(pts) + 1, end(pts),
       [&](ptx a, ptx b) { return ccw(pts[0], a, b) < 0; });
  check(0, 1);
  check(0, n - 1);
  check(1, n - 1);
  cout << "NO\n";
  return 0;
}
