#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (int i = 0; i < v.size(); i++) os << v[i] << " ";
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (typename set<T>::iterator it = v.begin(); it != v.end(); it++)
    os << *it << " ";
}
const int mod = 1e9 + 7;
const int N = 1e6 + 5;
int x[N], y[N];
int vis[N];
int tot;
int n, p;
bool pd(int i, int j, int k) {
  return 1ll * (x[j] - x[i]) * (y[k] - y[j]) ==
         1ll * (y[j] - y[i]) * (x[k] - x[j]);
}
bool pd(int a1, int a2) {
  memset(vis, 0, sizeof(vis));
  tot = 0;
  vis[a1] = 1;
  vis[a2] = 1;
  tot = 2;
  for (int i = (1); i <= (n); i++) {
    if (i == a1 || i == a2) continue;
    if (pd(a1, a2, i)) {
      vis[i] = 1;
      tot++;
    }
  }
  if (n - tot <= 2) {
    return 1;
  }
  vector<int> b;
  for (int i = (1); i <= (n); i++) {
    if (!vis[i]) {
      b.push_back(i);
    }
  }
  tot += 2;
  for (int i = (2); i <= ((int)b.size() - 1); i++) {
    if (pd(b[0], b[1], b[i])) {
      tot++;
    }
  }
  if (tot == n) {
    return 1;
  }
  return 0;
}
int main() {
  cin >> n;
  if (n <= 4) {
    puts("YES");
    return 0;
  }
  for (int i = (1); i <= (n); i++) {
    cin >> x[i] >> y[i];
  }
  tot = 2;
  vis[1] = vis[2] = 1;
  for (int i = (3); i <= (n); i++) {
    if (pd(1, 2, i)) {
      vis[i] = 1;
      tot++;
    } else {
      p = i;
    }
  }
  if (n - tot <= 2) {
    puts("YES");
    return 0;
  }
  if (pd(1, p)) {
    puts("YES");
    return 0;
  }
  if (pd(2, p)) {
    puts("YES");
    return 0;
  }
  if (pd(1, 2)) {
    puts("YES");
    return 0;
  }
  puts("NO");
  return 0;
}
