#include <bits/stdc++.h>
using namespace std;
struct para {
  long double k, b, z;
  bool operator<(const para &a) const {
    if (k < a.k) return 1;
    if (k > a.k) return 0;
    if (b < a.b) return 1;
    return 0;
  }
};
const long long MAXN = 2e5 + 5, INF = 9e17, MOD = 1e9 + 7;
long long n, m, x[MAXN], y[MAXN], c, a[MAXN], b[MAXN], l;
para z;
bool u[5];
long long k1, b1, k2, b2;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  ;
  cin >> n;
  if (n < 5) {
    cout << "YES";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int i = 0; i < 3; i++) {
    for (int j = i + 1; j < 4; j++) {
      for (int k = j + 1; k < 5; k++) {
        if ((x[k] - x[j]) * (y[j] - y[i]) == (x[j] - x[i]) * (y[k] - y[j])) {
          k1 = x[i];
          b1 = y[i];
          k2 = x[j];
          b2 = y[j];
        }
      }
    }
  }
  if (!k1 && !k2 && !b1 && !b2) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if ((k1 - k2) * (b2 - y[i]) != (k2 - x[i]) * (b1 - b2)) {
      a[l] = x[i];
      b[l] = y[i];
      l++;
    }
  }
  if (l < 3) {
    cout << "YES";
    return 0;
  }
  for (int i = 2; i < l; i++) {
    if ((a[i] - a[1]) * (b[1] - b[0]) != (b[i] - b[1]) * (a[1] - a[0])) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
