#include <bits/stdc++.h>
using namespace std;
struct point {
  long long int x, y;
  point() {}
  point(long long int x, long long int y) : x(x), y(y) {}
};
point operator-(point p1, point p2) { return point(p1.x - p2.x, p1.y - p2.y); }
long long int prodvec(point p1, point p2) { return p1.x * p2.y - p1.y * p2.x; }
bool enrecta(point p0, point p1, point p) {
  return prodvec(p - p0, p - p1) == 0;
}
bool alineados(vector<point> v) {
  if (int(v.size()) <= 2) return true;
  for (int i = 2; i < int(v.size()); i++)
    if (not enrecta(v[0], v[1], v[i])) return false;
  return true;
}
bool intenta(vector<point> v, point p0, point p1) {
  vector<point> nextv;
  for (int i = 0; i < int(v.size()); i++)
    if (not enrecta(p0, p1, v[i])) nextv.push_back(v[i]);
  return alineados(nextv);
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<point> v(n);
  for (int i = 0; i < n; i++) cin >> v[i].x >> v[i].y;
  if (n <= 3) {
    cout << "YES" << endl;
    exit(0);
  }
  if (intenta(v, v[0], v[1]) or intenta(v, v[0], v[2]) or
      intenta(v, v[1], v[2]))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
