#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
pair<long long int, long long int> p[N];
int n;
bitset<N> visited;
bool slope(pair<long long int, long long int> a,
           pair<long long int, long long int> b,
           pair<long long int, long long int> c) {
  return (b.second - a.second) * (c.first - b.first) ==
         (c.second - b.second) * (b.first - a.first);
}
bool check2(pair<long long int, long long int> a,
            pair<long long int, long long int> b) {
  int ff = -1, ss = -1;
  for (int i = (0); i < (n); i++) {
    if (!visited[i]) {
      if (ff == -1)
        ff = i;
      else if (ss == -1)
        ss = i;
    }
  }
  if (ff == -1 or ss == -1) return true;
  for (int i = (0); i < (n); i++) {
    if (!visited[i]) {
      if (slope(p[ff], p[ss], p[i])) visited[i] = 1;
    }
  }
  return visited.count() == n;
}
bool check(pair<long long int, long long int> a,
           pair<long long int, long long int> b) {
  visited.reset();
  for (int i = (0); i < (n); i++) {
    if (slope(a, b, p[i])) visited[i] = 1;
  }
  return check2(a, b);
}
void solve() {
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> p[i].first >> p[i].second;
  if (n < 5) {
    cout << "YES";
    return;
  }
  if (check(p[0], p[1]) or check(p[1], p[2]) or check(p[0], p[2]))
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  solve();
  cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " s. \n";
  return 0;
}
