#include <bits/stdc++.h>
using namespace std;
int n;
struct point {
  long long x;
  long long y;
};
vector<point> points;
vector<vector<long long> > lines(2);
vector<long long> gtLn(point fst, point scnd) {
  vector<long long> line(3);
  line[0] = fst.y - scnd.y;
  line[1] = scnd.x - fst.x;
  line[2] = fst.x * scnd.y - scnd.x * fst.y;
  return line;
}
bool check(int i, int r) {
  return (lines[r][0] * points[i].x + lines[r][1] * points[i].y + lines[r][2] ==
          0);
}
bool solve() {
  int p[3] = {0, 1, 2};
  do {
    bool ok = true;
    bool haveSecond = false;
    bool haveSecondLine = false;
    lines[0] = gtLn(points[p[0]], points[p[1]]);
    point second;
    for (int i = 0; i < n; ++i) {
      if (!check(i, 0)) {
        if (haveSecondLine) {
          if (!check(i, 1)) {
            ok = false;
            break;
          }
        } else if (haveSecond) {
          lines[1] = gtLn(second, points[i]);
          haveSecondLine = true;
        } else {
          second = points[i];
          haveSecond = true;
        }
      }
    }
    if (ok) {
      return true;
    }
  } while (next_permutation(p, p + 3));
  return false;
}
int main() {
  cin >> n;
  if (n < 5) {
    cout << "YES";
    return 0;
  }
  points.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> points[i].x >> points[i].y;
  }
  cout << (solve() ? "YES" : "NO");
}
