#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int N = 1e5 + 10;
string s, ss;
bool did[N], vis[N];
long long a[N], b[N], ans, m, n, suma, sumb, cnt, q, x[N], y[N];
int check(int fi, int se) {
  memset(did, 0, sizeof did);
  did[fi] = did[se] = 1;
  for (int i = 1; i <= n; i++) {
    if (!did[i]) {
      if ((y[fi] - y[se]) * (x[i] - x[fi]) ==
          (x[fi] - x[se]) * (y[i] - y[fi])) {
        did[i] = 1;
      }
    }
  }
  int ffi, sse;
  for (int i = 1; i <= n; i++)
    if (!did[i]) {
      ffi = i;
      did[i] = 1;
      break;
    }
  if (n == ffi) return 1;
  for (int i = 1; i <= n; i++)
    if (!did[i]) {
      sse = i;
      did[i] = 1;
      break;
    }
  for (int i = 1; i <= n; i++) {
    if (!did[i]) {
      if ((y[ffi] - y[sse]) * (x[i] - x[ffi]) ==
          (x[ffi] - x[sse]) * (y[i] - y[ffi]))
        did[i] = 1;
    }
  }
  for (int i = 1; i <= n; i++)
    if (!did[i]) return 0;
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  if (n <= 4) return cout << "YES" << endl, 0;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  if (check(1, 2) || check(1, 3) || check(2, 3))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
