#include <bits/stdc++.h>
using namespace std;
class ProblemDPairOfLines {
 public:
  vector<pair<int, int> > P;
  bool colinear(pair<int, int> a, pair<int, int> b, pair<int, int> c) {
    return 1LL * (b.first - a.first) * (b.second - c.second) ==
           1LL * (b.first - c.first) * (b.second - a.second);
  }
  bool wow(pair<int, int> a, pair<int, int> b) {
    vector<pair<int, int> > others;
    for (auto x : P)
      if (!colinear(a, b, x)) others.push_back(x);
    for (int i = 2; i < others.size(); ++i)
      if (!colinear(others[0], others[1], others[i])) return false;
    return true;
  }
  void solve(std::istream& in, std::ostream& out) {
    int n;
    in >> n;
    for (int i = 0; i < n; ++i) {
      int x, y;
      in >> x >> y;
      P.emplace_back(x, y);
    }
    if (n <= 4) {
      out << "YES";
      return;
    }
    if (wow(P[0], P[1]) or wow(P[0], P[2]) or wow(P[1], P[2]))
      out << "YES";
    else
      out << "NO";
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ProblemDPairOfLines solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
