#include <bits/stdc++.h>
using namespace std;
struct Vector {
  long long x, y;
  long long operator*(const Vector& other) const {
    return x * other.y - other.x * y;
  }
  Vector operator-(const Vector& other) const {
    return {x - other.x, y - other.y};
  }
};
bool collinear(const Vector& v, const Vector& u, const Vector& w) {
  return (u - v) * (w - v) == 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  if (n <= 4) {
    cout << "YES\n";
    return 0;
  }
  Vector tab[n];
  for (int i = 0; i < n; i++) {
    cin >> tab[i].x >> tab[i].y;
  }
  Vector v1, v2;
  Vector u1, u2;
  bool flag[n];
  bool can;
  int id;
  for (int i = 0; i < 3; i++) {
    v1 = tab[i];
    v2 = tab[(i + 1) % 3];
    u1 = tab[(i + 2) % 3];
    can = true;
    for (int j = 3; j < n; j++) {
      flag[j] = collinear(v1, v2, tab[j]);
    }
    id = -1;
    for (int j = 3; j < n; j++) {
      if (!flag[j]) {
        u2 = tab[j];
        id = j;
        break;
      }
    }
    if (id == -1) {
      cout << "YES\n";
      return 0;
    }
    for (int j = 3; can && j < n; j++) {
      if (j == id || flag[j]) continue;
      can = collinear(u1, u2, tab[j]);
    }
    if (can) {
      cout << "YES\n";
      return 0;
    }
  }
  v1 = tab[0];
  v2 = tab[1];
  if (collinear(v1, v2, tab[2])) {
    can = true;
    for (int i = 3; i < n; i++) {
      flag[i] = collinear(v1, v2, tab[i]);
    }
    for (int i = 3; i < n; i++) {
      if (!flag[i]) {
        u1 = tab[i];
        id = -1;
        for (int j = i + 1; j < n; j++) {
          if (!flag[j]) {
            id = j;
            u2 = tab[j];
            break;
          }
        }
        if (id == -1) {
          cout << "YES\n";
          return 0;
        }
        break;
      }
    }
    for (int i = 3; can && i < n; i++) {
      can = flag[i] || collinear(u1, u2, tab[i]);
    }
    if (can) {
      cout << "YES\n";
      return 0;
    }
  }
  cout << "NO\n";
}
