#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
} p[100105];
int basis[5];
struct line {
  int i1, i2;
} l1, l2;
bool lcollinear(line l, point pp) {
  point a = p[l.i1];
  point b = p[l.i2];
  point c = pp;
  return ((a.x * b.y + b.x * c.y + c.x * a.y) ==
          (a.y * b.x + b.y * c.x + c.y * a.x));
}
bool collinear(point a, point b, point c) {
  return ((a.x * b.y + b.x * c.y + c.x * a.y) ==
          (a.y * b.x + b.y * c.x + c.y * a.x));
}
int n;
int nonLinear[100105];
int nsz;
bool f(int i1, int i2) {
  nsz = 0;
  l1.i1 = basis[i1];
  l1.i2 = basis[i2];
  for (int i = 0; i < n; i++) {
    if (!lcollinear(l1, p[i])) {
      nonLinear[nsz] = i;
      nsz++;
    }
  }
  if (nsz <= 2) return true;
  l2.i1 = nonLinear[0];
  l2.i2 = nonLinear[1];
  for (int i = 2; i < nsz; i++) {
    if (!lcollinear(l2, p[nonLinear[i]])) {
      return false;
    }
  }
  return true;
}
int main() {
  l1 = {-1, -1};
  l2 = {-1, -1};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld %lld", &p[i].x, &p[i].y);
  }
  if (n <= 4) {
    cout << "YES\n";
    return 0;
  }
  basis[0] = 0;
  basis[1] = 1;
  for (int i = 2; i < n; i++) {
    if (!collinear(p[0], p[1], p[i])) {
      basis[2] = i;
      break;
    }
  }
  if (f(0, 1))
    cout << "YES\n";
  else if (f(1, 2))
    cout << "YES\n";
  else if (f(2, 0))
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
