#include <bits/stdc++.h>
using namespace std;
long long check(long long x1, long long y1, long long x2, long long y2,
                long long x3, long long y3) {
  return x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2);
}
int main() {
  long long n;
  cin >> n;
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  long long x1 = v[0].first, y1 = v[0].second;
  long long x2 = v[1].first, y2 = v[1].second;
  long long x3 = v[2].first, y3 = v[2].second;
  long long val = check(x1, y1, x2, y2, x3, y3);
  if (val == 0) {
    vector<pair<long long, long long> > p;
    for (long long i = 3; i < n; i++) {
      long long y = check(x1, y1, x2, y2, v[i].first, v[i].second);
      if (y != 0) {
        p.push_back(v[i]);
      }
    }
    for (long long i = 2; i < p.size(); i++) {
      long long y = check(p[0].first, p[0].second, p[1].first, p[1].second,
                          p[i].first, p[i].second);
      if (y != 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
    cout << "YES" << endl;
  } else {
    bool ok = true;
    vector<pair<long long, long long> > p;
    for (long long i = 2; i < n; i++) {
      long long y = check(x1, y1, x2, y2, v[i].first, v[i].second);
      if (y != 0) {
        p.push_back(v[i]);
      }
    }
    for (long long i = 2; i < p.size(); i++) {
      long long y = check(p[0].first, p[0].second, p[1].first, p[1].second,
                          p[i].first, p[i].second);
      if (y != 0) {
        ok = false;
      }
    }
    if (ok) {
      cout << "YES" << endl;
      return 0;
    } else {
      ok = true;
    }
    p.clear();
    for (long long i = 1; i < n; i++) {
      long long y = check(x1, y1, x3, y3, v[i].first, v[i].second);
      if (y != 0) {
        p.push_back(v[i]);
      }
    }
    for (long long i = 2; i < p.size(); i++) {
      long long y = check(p[0].first, p[0].second, p[1].first, p[1].second,
                          p[i].first, p[i].second);
      if (y != 0) {
        ok = false;
      }
    }
    if (ok) {
      cout << "YES" << endl;
      return 0;
    } else {
      ok = true;
    }
    p.clear();
    for (long long i = 0; i < n; i++) {
      long long y = check(x2, y2, x3, y3, v[i].first, v[i].second);
      if (y != 0) {
        p.push_back(v[i]);
      }
    }
    for (long long i = 2; i < p.size(); i++) {
      long long y = check(p[0].first, p[0].second, p[1].first, p[1].second,
                          p[i].first, p[i].second);
      if (y != 0) {
        ok = false;
      }
    }
    if (ok) {
      cout << "YES" << endl;
      return 0;
    } else {
      cout << "NO" << endl;
      return 0;
    }
  }
  return 0;
}
