#include <bits/stdc++.h>
using namespace std;
long long x[2000000], y[2000000];
int n;
bool Collinear(int a, int b, int i) {
  return (x[a] - x[i]) * (y[b] - y[i]) == (x[b] - x[i]) * (y[a] - y[i]);
}
bool call(int a, int b) {
  vector<int> v;
  for (int i = 0; i < n; i++) {
    if (i == a || i == b) continue;
    if (Collinear(a, b, i) == false) {
      v.push_back(i);
    }
  }
  for (int i = 2; i < v.size(); i++) {
    if (Collinear(v[0], v[1], v[i]) == false) {
      return false;
    }
  }
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  } else {
    if (call(0, 1) | call(0, 2) | call(1, 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
