#include <bits/stdc++.h>
using namespace std;
long long int cross_product(pair<int, int> a, pair<int, int> b) {
  return (long long int)(a.first) * (long long int)(b.second) -
         (long long int)(a.second) * (long long int)(b.first);
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> points(n);
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    points[i] = make_pair(x, y);
  }
  if (n <= 3) {
    cout << "YES" << endl;
    return 0;
  }
  pair<int, int> a = points[0];
  pair<int, int> b = points[1];
  pair<int, int> c = points[2];
  pair<int, int> ab = {points[0].first - points[1].first,
                       points[0].second - points[1].second};
  pair<int, int> bc = {points[1].first - points[2].first,
                       points[1].second - points[2].second};
  pair<int, int> ac = {points[0].first - points[2].first,
                       points[0].second - points[2].second};
  long long int abc = cross_product(ab, bc);
  if (abc == 0) {
    points.erase(remove_if(points.begin(), points.end(),
                           [ab, a](pair<int, int> target) {
                             return cross_product(
                                        ab, {a.first - target.first,
                                             a.second - target.second}) == 0;
                           }),
                 points.end());
    for (int i = 0; i < int(points.size()) - 2; i++) {
      long long int result =
          cross_product({points[i].first - points[i + 1].first,
                         points[i].second - points[i + 1].second},
                        {points[i + 1].first - points[i + 2].first,
                         points[i + 1].second - points[i + 2].second});
      if (result != 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
    cout << "YES" << endl;
    return 0;
  }
  {
    auto temp = points;
    temp.erase(remove_if(temp.begin(), temp.end(),
                         [ab, a](pair<int, int> target) {
                           return cross_product(
                                      ab, {a.first - target.first,
                                           a.second - target.second}) == 0;
                         }),
               temp.end());
    bool abok = true;
    for (int i = 0; i < int(temp.size()) - 2; i++) {
      long long int result =
          cross_product({temp[i].first - temp[i + 1].first,
                         temp[i].second - temp[i + 1].second},
                        {temp[i + 1].first - temp[i + 2].first,
                         temp[i + 1].second - temp[i + 2].second});
      if (result != 0) {
        abok = false;
      }
    }
    if (abok) {
      cout << "YES" << endl;
      return 0;
    }
  }
  {
    auto temp = points;
    temp.erase(remove_if(temp.begin(), temp.end(),
                         [ac, a](pair<int, int> target) {
                           return cross_product(
                                      ac, {a.first - target.first,
                                           a.second - target.second}) == 0;
                         }),
               temp.end());
    bool acok = true;
    for (int i = 0; i < int(temp.size()) - 2; i++) {
      long long int result =
          cross_product({temp[i].first - temp[i + 1].first,
                         temp[i].second - temp[i + 1].second},
                        {temp[i + 1].first - temp[i + 2].first,
                         temp[i + 1].second - temp[i + 2].second});
      if (result != 0) {
        acok = false;
      }
    }
    if (acok) {
      cout << "YES" << endl;
      return 0;
    }
  }
  {
    auto temp = points;
    temp.erase(remove_if(temp.begin(), temp.end(),
                         [bc, b](pair<int, int> target) {
                           return cross_product(
                                      bc, {b.first - target.first,
                                           b.second - target.second}) == 0;
                         }),
               temp.end());
    bool bcok = true;
    for (int i = 0; i < int(temp.size()) - 2; i++) {
      long long int result =
          cross_product({temp[i].first - temp[i + 1].first,
                         temp[i].second - temp[i + 1].second},
                        {temp[i + 1].first - temp[i + 2].first,
                         temp[i + 1].second - temp[i + 2].second});
      if (result != 0) {
        bcok = false;
      }
    }
    if (bcok) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
