#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<pair<int, int>> xy(N);
int n;
void check(int a, int b, vector<bool> &flag) {
  for (int i = 0; i < n; i += 1) {
    if (flag[i]) continue;
    long long x0 = xy[i].first - xy[a].first;
    long long y0 = xy[i].second - xy[a].second;
    long long x1 = xy[i].first - xy[b].first;
    long long y1 = xy[i].second - xy[b].second;
    if (x0 * y1 == x1 * y0) flag[i] = true;
  }
}
bool solve(int a, int b) {
  vector<bool> flag(n, false);
  flag[a] = flag[b] = true;
  check(a, b, flag);
  a = -1, b = -1;
  for (int i = 0; i < n; i += 1) {
    if (flag[i] == false) {
      if (a == -1)
        a = i;
      else if (b == -1)
        b = i;
      else
        break;
    }
  }
  if (b == -1) return true;
  check(a, b, flag);
  bool pass = true;
  for (int i = 0; i < n; i += 1) {
    if (flag[i] == false) pass = false;
  }
  return pass;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i += 1) cin >> xy[i].first >> xy[i].second;
  if (n <= 3)
    cout << "YES" << endl;
  else if (solve(0, 1))
    cout << "YES" << endl;
  else if (solve(0, 2))
    cout << "YES" << endl;
  else if (solve(1, 2))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
