#include <bits/stdc++.h>
using namespace std;
int const N = 2e5 + 5;
int const MAX = 1e9 + 5;
int n;
struct Line {
  long long a, b, c;
};
pair<int, int> cor[N];
Line getLine(pair<int, int> A, pair<int, int> B) {
  Line D;
  D.b = B.first - A.first;
  D.a = -(B.second - A.second);
  D.c = -D.a * A.first - D.b * A.second;
  return D;
}
long long getVal(pair<int, int> A, Line D) {
  return D.a * A.first + D.b * A.second + D.c;
}
void check(pair<int, int> A, pair<int, int> B) {
  Line D = getLine(A, B);
  pair<int, int> pre = make_pair(MAX, MAX);
  Line H;
  H.a = H.b = H.c = 0;
  for (int i = 1; i <= n; i++) {
    if (getVal(cor[i], D) == 0) continue;
    if (pre != make_pair(MAX, MAX)) {
      H = getLine(pre, cor[i]);
      break;
    } else {
      pre = cor[i];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (getVal(cor[i], D) && getVal(cor[i], H)) {
      return;
    }
  }
  cout << "YES" << endl;
  exit(0);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> cor[i].first >> cor[i].second;
  }
  if (n <= 3) {
    cout << "YES" << endl;
    return 0;
  }
  check(cor[1], cor[2]);
  check(cor[1], cor[3]);
  check(cor[2], cor[3]);
  cout << "NO" << endl;
}
