#include <bits/stdc++.h>
using namespace std;
const int N = 1e6, M = 1e9 + 7;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int n, x[N], y[N];
map<pair<long double, long double>, int> mp;
int t(int i, int j) {
  long double dX = x[i] - x[j];
  long double dY = y[i] - y[j];
  long double g = gcd(dX, dY);
  dX /= g, dY /= g;
  vector<int> r;
  for (int k = 0; k < n; k++) {
    if (k == i || k == j) continue;
    long double tmpx = x[i] - x[k];
    long double tmpy = y[i] - y[k];
    long double g = gcd(tmpx, tmpy);
    tmpx /= g, tmpy /= g;
    if (tmpx == dX && tmpy == dY)
      continue;
    else
      r.push_back(k);
  }
  if (r.size() < 2) return true;
  long double x2 = x[r[0]] - x[r[1]];
  long double y2 = y[r[0]] - y[r[1]];
  g = gcd(x2, y2);
  if (g) x2 /= g, y2 /= g;
  for (int i = 1; i < r.size(); i++) {
    long double tmpx = x[r[0]] - x[r[i]];
    long double tmpy = y[r[0]] - y[r[i]];
    long double g = gcd(tmpx, tmpy);
    if (g) tmpx /= g, tmpy /= g;
    if (x2 != tmpx || y2 != tmpy) return false;
  }
  return true;
}
int main() {
  scanf("%d", &n);
  int cnt = 0;
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i < n; i++) {
    long double dX = x[i] - x[0];
    long double dY = y[i] - y[0];
    long double g = gcd(dX, dY);
    dX /= g, dY /= g;
    if (!mp[{dX, dY}]) mp[{dX, dY}] = i, cnt++;
    if (cnt == 2) break;
  }
  if (cnt < 2) {
    return puts("YES"), 0;
  } else {
    vector<int> v;
    for (auto it = mp.begin(); it != mp.end(); it++) {
      v.push_back(it->second);
      if (t(0, it->second)) return puts("YES");
    }
    if (t(v[0], v[1])) return puts("YES");
  }
  puts("NO");
}
