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