#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> v;
bool is_col(long long i, long long j, long long k) {
  pair<long long, long long>&a = v[i], &b = v[j], &c = v[k];
  return (b.second - a.second) * (c.first - b.first) ==
         (c.second - b.second) * (b.first - a.first);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  v.resize(n);
  for (pair<long long, long long>& x : v) {
    cin >> x.first >> x.second;
  }
  if (n <= 4) {
    cout << "YES" << '\n';
    ;
    return 0;
  }
  vector<tuple<long long, long long, long long>> indices = {
      {0, 1, 2}, {0, 1, 3}, {0, 1, 4}, {0, 2, 3}, {0, 2, 4},
      {0, 3, 4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}};
  long long i = -1, j = -1, k = -1;
  for (auto v : indices) {
    if (is_col(get<0>(v), get<1>(v), get<2>(v))) {
      i = get<0>(v);
      j = get<1>(v);
      k = get<2>(v);
    }
  }
  if (i < 0) {
    cout << "NO" << '\n';
    ;
    return 0;
  }
  set<pair<long long, long long>> st = {v[i], v[j], v[k]}, st2;
  for (long long ii = 0; ii < n; ii++) {
    if (ii == i || ii == j || ii == k) continue;
    if (is_col(i, j, ii)) {
      st.insert(v[ii]);
    }
  }
  if (n - st.size() <= 2) {
    cout << "YES" << '\n';
    ;
    return 0;
  }
  vector<long long> ind;
  for (long long i = 0; i < n; i++) {
    if (!st.count(v[i])) {
      st2.insert(v[i]);
      ind.push_back(i);
      if (st2.size() == 2) {
        break;
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    if (i != ind[0] && i != ind[1] && !st.count(v[i])) {
      if (is_col(ind[0], ind[1], i)) {
        st2.insert(v[i]);
      }
    }
  }
  if (st.size() + st2.size() == n) {
    cout << "YES" << '\n';
    ;
  } else {
    cout << "NO" << '\n';
    ;
  }
}
