#include <bits/stdc++.h>
using namespace std;
long long int n, x[100005], y[100005], a[100005];
vector<pair<long long int, long long int> > b;
vector<long long int> C;
bool isOnline(long long int i, long long int j, long long int k) {
  return ((y[i] - y[j]) * (x[j] - x[k]) == (y[j] - y[k]) * (x[i] - x[j]));
}
const long long int EPS = 0;
struct PT {
  long long int x, y;
  PT() {}
  PT(long long int x, long long int y) : x(x), y(y) {}
  bool operator<(const PT &rhs) const {
    return make_pair(y, x) < make_pair(rhs.y, rhs.x);
  }
  bool operator==(const PT &rhs) const {
    return make_pair(y, x) == make_pair(rhs.y, rhs.x);
  }
};
long long int cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
long long int area2(PT a, PT b, PT c) {
  return cross(a, b) + cross(b, c) + cross(c, a);
}
bool between(const PT &a, const PT &b, const PT &c) {
  return (abs(area2(a, b, c)) == 0 && (a.x - b.x) * (c.x - b.x) <= 0 &&
          (a.y - b.y) * (c.y - b.y) <= 0);
}
void ConvexHull(vector<PT> &pts) {
  sort(pts.begin(), pts.end());
  pts.erase(unique(pts.begin(), pts.end()), pts.end());
  vector<PT> up, dn;
  for (int i = 0; i < pts.size(); i++) {
    while (up.size() > 1 && area2(up[up.size() - 2], up.back(), pts[i]) >= 0)
      up.pop_back();
    while (dn.size() > 1 && area2(dn[dn.size() - 2], dn.back(), pts[i]) <= 0)
      dn.pop_back();
    up.push_back(pts[i]);
    dn.push_back(pts[i]);
  }
  pts = dn;
  for (int i = (int)up.size() - 2; i >= 1; i--) pts.push_back(up[i]);
  if (pts.size() <= 2) return;
  dn.clear();
  dn.push_back(pts[0]);
  dn.push_back(pts[1]);
  for (int i = 2; i < pts.size(); i++) {
    if (between(dn[dn.size() - 2], dn[dn.size() - 1], pts[i])) dn.pop_back();
    dn.push_back(pts[i]);
  }
  if (dn.size() >= 3 && between(dn.back(), dn[0], dn[1])) {
    dn[0] = dn.back();
    dn.pop_back();
  }
  pts = dn;
}
vector<PT> pts;
bool check1(pair<long long int, long long int> a,
            pair<long long int, long long int> b,
            pair<long long int, long long int> c,
            pair<long long int, long long int> d) {
  long long int a1, b1, c1, d1;
  for (int i = 1; i <= n; i++)
    if (x[i] == a.first && y[i] == a.second) a1 = i;
  for (int i = 1; i <= n; i++)
    if (x[i] == b.first && y[i] == b.second) b1 = i;
  for (int i = 1; i <= n; i++)
    if (x[i] == c.first && y[i] == c.second) c1 = i;
  if (d.first == -1e18) {
    C.clear();
    for (int i = 1; i <= n; i++)
      if (i != c1 && !isOnline(i, a1, b1)) C.push_back(i);
    if (C.size() <= 1) return 1;
    for (int j = 1; j < C.size(); j++)
      if (!isOnline(C[j], c1, C[0])) return 0;
    return 1;
  }
  for (int i = 1; i <= n; i++)
    if (x[i] == d.first && y[i] == d.second) d1 = i;
  long long int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (isOnline(i, a1, b1) || isOnline(i, c1, d1)) cnt++;
  return (cnt == n);
}
bool check() {
  bool an = 0;
  b.clear();
  for (auto j : pts) b.push_back({j.x, j.y});
  if (b.size() == 2) return check1(b[0], b[1], b[0], b[1]);
  if (b.size() == 3) {
    for (int i = 1; i <= 7; i++) {
      an |= check1(b[0], b[1], b[2], {-1e18, -1e18});
      next_permutation(b.begin(), b.end());
    }
  }
  if (b.size() == 4) {
    for (int i = 1; i <= 25; i++) {
      an |= check1(b[0], b[1], b[2], b[3]);
      next_permutation(b.begin(), b.end());
    }
  }
  return an;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i], a[i] = i;
  for (int i = 1; i <= n; i++) pts.push_back({x[i], y[i]});
  if (n < 4) return cout << "YES" << '\n', 0;
  ConvexHull(pts);
  if (check1({x[1], y[1]}, {x[2], y[2]}, {x[1], y[1]}, {x[2], y[2]}))
    return cout << "YES" << '\n', 0;
  if (pts.size() > 4) return cout << "NO" << '\n', 0;
  if (check()) return cout << "YES" << '\n', 0;
  cout << "NO" << '\n';
  return 0;
}
