#include <bits/stdc++.h>
using namespace std;
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int Set(int N, int pos) { return N = N | (1 << pos); }
int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int hr[] = {-2, -2, -1, +1, +2, +2, -1, +1};
int hc[] = {+1, -1, +2, +2, -1, +1, -2, -2};
int dx[] = {+1, -1, +0, +0};
int dy[] = {+0, +0, +1, -1};
const int MAXN = (int)1e5 + 9;
int main() {
  long long i, j, k, l, m, n, p, q, x, y, u, v, r, tc, t, x1, x2, y1, y2;
  cin >> n;
  vector<pair<long long, long long> > point, vv;
  set<pair<long long, long long> > st;
  set<pair<long long, long long> >::iterator it;
  for (int i = 1; i <= (int)n; i++) {
    cin >> x >> y;
    point.push_back(pair<long long, long long>(x, y));
  }
  if (n <= 3) {
    cout << "YES\n";
    return 0;
  }
  x1 = point[0].first, y1 = point[0].second;
  x2 = point[1].first, y2 = point[1].second;
  for (int i = 2; i <= (int)n - 1; i++) {
    x = point[i].first;
    y = point[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2))
      vv.push_back(pair<long long, long long>(x, y));
  }
  if (vv.size() <= 2) {
    cout << "YES\n";
    return 0;
  }
  x1 = vv[0].first, y1 = vv[0].second;
  x2 = vv[1].first, y2 = vv[1].second;
  for (i = 2; i < vv.size(); i++) {
    x = vv[i].first, y = vv[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2)) break;
  }
  if (i == vv.size()) {
    cout << "YES\n";
    return 0;
  }
  vv.clear();
  x1 = point[2].first, y1 = point[2].second;
  x2 = point[1].first, y2 = point[1].second;
  vv.push_back(point[0]);
  for (int i = 3; i <= (int)n - 1; i++) {
    x = point[i].first;
    y = point[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2))
      vv.push_back(pair<long long, long long>(x, y));
  }
  if (vv.size() <= 2) {
    cout << "YES\n";
    return 0;
  }
  x1 = vv[0].first, y1 = vv[0].second;
  x2 = vv[1].first, y2 = vv[1].second;
  for (i = 2; i < vv.size(); i++) {
    x = vv[i].first, y = vv[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2)) break;
  }
  if (i == vv.size()) {
    cout << "YES\n";
    return 0;
  }
  vv.clear();
  x1 = point[0].first, y1 = point[0].second;
  x2 = point[2].first, y2 = point[2].second;
  vv.push_back(point[1]);
  for (int i = 3; i <= (int)n - 1; i++) {
    x = point[i].first;
    y = point[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2))
      vv.push_back(pair<long long, long long>(x, y));
  }
  if (vv.size() <= 2) {
    cout << "YES\n";
    return 0;
  }
  x1 = vv[0].first, y1 = vv[0].second;
  x2 = vv[1].first, y2 = vv[1].second;
  for (i = 2; i < vv.size(); i++) {
    x = vv[i].first, y = vv[i].second;
    if (x * (y1 - y2) - y * (x1 - x2) != (x2 * y1) - (x1 * y2)) break;
  }
  if (i == vv.size()) {
    cout << "YES\n";
    return 0;
  }
  vv.clear();
  cout << "NO\n";
  return 0;
}
