#include <bits/stdc++.h>
using namespace std;
long long x[100005], n, y[100005];
bool be[100005];
bool rect(long long i, long long j, long long k) {
  long long x1 = x[i] - x[j], x2 = x[i] - x[k], y1 = y[i] - y[j],
            y2 = y[i] - y[k];
  return (x1 * y2 - x2 * y1) == 0;
}
bool nice(long long a, long long b) {
  bool bx = 1;
  memset(be, 0, sizeof(be));
  be[a] = 1, be[b] = 1;
  for (long long i = 0; i < n; i++) {
    if (i != a && i != b) {
      if (rect(a, b, i)) be[i] = 1;
    }
  }
  long long a1, a2, cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (!be[i]) cnt++;
  }
  if (cnt <= 2) return 1;
  for (long long i = 0; i < n; i++) {
    if (!be[i]) {
      a1 = i;
      be[i] = 1;
      break;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (!be[i]) {
      a2 = i;
      be[i] = 1;
      break;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (!be[i]) {
      if (!rect(a1, a2, i)) bx = 0;
    }
  }
  return bx;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  if (nice(0, 1) || nice(0, 2) || nice(1, 2)) {
    cout << "YES" << '\n';
  } else
    cout << "NO" << '\n';
  return 0;
}
