#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const long long base = 1e9 + 7;
pair<long long, long long> operator-(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
int n;
vector<pair<long long, long long> > pts;
pair<long long, long long> badp;
bool test(pair<long long, long long> a, pair<long long, long long> b) {
  long long A = a.second - b.second;
  long long B = b.first - a.first;
  long long C = a.first * b.second - b.first * a.second;
  vector<int> bad;
  for (int i = 0; i < (int)n; i++) {
    if (A * pts[i].first + B * pts[i].second + C != 0) {
      badp = pts[i];
      bad.push_back(i);
    }
  }
  if (bad.size() <= 2) {
    return true;
  }
  pair<long long, long long> a1 = pts[bad[0]];
  pair<long long, long long> b1 = pts[bad[1]];
  long long A1 = a1.second - b1.second;
  long long B1 = b1.first - a1.first;
  long long C1 = a1.first * b1.second - b1.first * a1.second;
  int cnt = 0;
  for (int i = 0; i < (int)bad.size(); i++) {
    if (A1 * pts[bad[i]].first + B1 * pts[bad[i]].second + C1 != 0) {
      cnt++;
    }
  }
  if (cnt == 0) {
    return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  pts = vector<pair<long long, long long> >(n);
  for (int i = 0; i < (int)n; i++) {
    cin >> pts[i].first >> pts[i].second;
  }
  if (n <= 2) {
    cout << "YES" << endl;
    return 0;
  }
  pair<long long, long long> a, b;
  a = pts[0];
  b = pts[1];
  bool f = test(a, b);
  if (f) {
    cout << "YES" << endl;
    return 0;
  }
  pair<long long, long long> was = b;
  b = badp;
  f = test(a, b);
  if (f) {
    cout << "YES" << endl;
    return 0;
  }
  a = was;
  f = test(a, b);
  if (f) {
    cout << "YES" << endl;
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
