#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long double PI = 3.14159265;
long long int powerWithMod(long long int base, long long int exponent,
                           long long int modulus = LLONG_MAX) {
  long long int result = 1;
  base %= modulus;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent >>= 1;
    base = (base * base) % modulus;
  }
  return result;
}
long long int modInverse(long long int a, long long int m = MOD) {
  return powerWithMod(a, m - 2, m);
}
template <typename T>
void term(T x) {
  cout << x << "\n";
  exit(0);
}
int n;
vector<pair<long long int, long long int>> a;
pair<long long int, long long int> operator-(
    pair<long long int, long long int>& a,
    pair<long long int, long long int>& b) {
  return {a.first - b.first, a.second - b.second};
}
long long int cp(pair<long long int, long long int> a,
                 pair<long long int, long long int> b) {
  return a.first * b.second - a.second * b.first;
}
vector<pair<long long int, long long int>> f(
    vector<pair<long long int, long long int>>& a) {
  vector<pair<long long int, long long int>> ans;
  for (int i = 2; i < a.size(); i++)
    if (cp(a[i] - a[0], a[1] - a[0]) != 0) ans.push_back(a[i]);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  if (n < 5) term("YES");
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a.push_back({x, y});
  }
  for (int i = 0; i < 3; i++) {
    auto t = f(a);
    auto t1 = f(t);
    if (t1.empty()) term("YES");
    swap(a[2], a[i]);
  }
  term("NO");
  return 0;
}
