#include <bits/stdc++.h>
const long long int INF = (1e9 + 12312), MOD = 1e9 + 7;
const long double EPS = 0.0000000001;
using namespace std;
vector<pair<long long int, long long int> > a;
pair<long long int, pair<long long int, long long int> > l(long long int x,
                                                           long long int y) {
  long long int x1, x2, y1, y2;
  x1 = a[x].first;
  x2 = a[y].first;
  y1 = a[x].second;
  y2 = a[y].second;
  long long int a = y2 - y1;
  long long int b = x1 - x2;
  long long int c = x2 * y1 - x1 * y2;
  return make_pair(a, make_pair(b, c));
}
bool can(long long int x, long long int y) {
  auto ff = l(x, y);
  long long int a1, b1, c1;
  a1 = ff.first;
  b1 = ff.second.first;
  c1 = ff.second.second;
  vector<long long int> rer;
  for (long long int i = 0; i < (long long int)a.size(); i++) {
    if (a1 * a[i].first + b1 * a[i].second + c1 != 0) {
      rer.push_back(i);
    }
  }
  if ((long long int)rer.size() < 3) {
    return 1;
  }
  auto f2 = l(rer[0], rer[1]);
  long long int a2, b2, c2;
  a2 = f2.first;
  b2 = f2.second.first;
  c2 = f2.second.second;
  for (long long int i = 0; i < (long long int)a.size(); i++) {
    if (a1 * a[i].first + b1 * a[i].second + c1 != 0) {
      if (a2 * a[i].first + b2 * a[i].second + c2 != 0) {
        return 0;
      }
    }
  }
  return 1;
}
int main() {
  long long int n;
  cin >> n;
  if (n < 3) {
    cout << "YES\n";
    return 0;
  }
  for (long long int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    a.push_back(make_pair(x, y));
  }
  if (can(0, 1)) {
    cout << "YES\n";
    return 0;
  }
  if (can(1, 2)) {
    cout << "YES\n";
    return 0;
  }
  if (can(0, 2)) {
    cout << "YES\n";
    return 0;
  }
  cout << "NO\n";
  return 0;
}
