#include <bits/stdc++.h>
using namespace std;
FILE *in, *out;
int N, M, K;
pair<long long, long long> ar[100100];
long long cross(pair<long long, long long> p1, pair<long long, long long> p2,
                pair<long long, long long> p3) {
  return (p2.first - p1.first) * (p3.second - p1.second) -
         (p2.second - p1.second) * (p3.first - p1.first);
}
int used[100100];
int read() {
  int i, j, k;
  int x, y;
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> ar[i].first >> ar[i].second;
  }
  if (N <= 4) {
    cout << "YES\n";
    return 0;
  }
  int ind1 = -1, ind2 = -1;
  for (i = 0; i < 3; i++) {
    for (j = i + 1; j < 4; j++) {
      for (k = j + 1; k < 5; k++) {
        if (cross(ar[i], ar[j], ar[k]) == 0) {
          ind1 = i;
          ind2 = j;
          break;
        }
      }
      if (ind1 != -1) break;
    }
    if (ind1 != -1) break;
  }
  if (ind1 == -1) {
    cout << "NO\n";
    return 0;
  }
  used[ind1] = 1;
  used[ind2] = 1;
  for (i = 0; i < N; i++) {
    if (used[i]) continue;
    if (cross(ar[ind1], ar[ind2], ar[i]) == 0) {
      used[i] = 1;
    }
  }
  ind1 = -1;
  ind2 = -1;
  for (i = 0; i < N; i++) {
    if (used[i] == 0) {
      if (ind1 == -1) {
        used[i] = 1;
        ind1 = i;
      } else {
        used[i] = 1;
        ind2 = i;
        break;
      }
    }
  }
  if (ind1 == -1 || ind2 == -1) {
    cout << "YES\n";
    return 0;
  }
  for (i = 0; i < N; i++) {
    if (used[i]) continue;
    if (cross(ar[ind1], ar[ind2], ar[i]) != 0) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  in = stdin;
  out = stdout;
  read();
  return 0;
}
