#include <bits/stdc++.h>
using namespace std;
int n, x[100005], y[100005];
bool collinear(int a, int b, int c) {
  long long x1 = x[a] - x[b];
  long long x2 = x[a] - x[c];
  long long y1 = y[a] - y[b];
  long long y2 = y[a] - y[c];
  return x1 * y2 - x2 * y1 == 0;
}
bool obtRes(int a1, int a2) {
  int b1 = -1, b2 = -1;
  for (int i = 0; i < n; i++) {
    if (a1 == i || a2 == i) continue;
    if (collinear(a1, a2, i)) continue;
    if (b1 == -1)
      b1 = i;
    else if (b2 == -1)
      b2 = i;
    else if (!collinear(b1, b2, i))
      return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n < 4) {
    cout << "YES" << '\n';
    return 0;
  }
  if (obtRes(0, 1) || obtRes(0, 2) || obtRes(1, 2))
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
