#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e5 + 5;
long long x[maxx], y[maxx];
int n;
bool check(int a, int b, int c, int d) {
  return (x[b] - x[a]) * (y[d] - y[c]) == (x[d] - x[c]) * (y[b] - y[a]);
}
int fun(int d, int f) {
  vector<int> v;
  for (int i = 1; i <= n; i++)
    if (!check(d, f, f, i)) v.push_back(i);
  if (v.size() < 3) return 1;
  for (int i = 2; i < v.size(); i++)
    if (!check(v[0], v[1], v[1], v[i])) return 0;
  return 1;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  if (n < 5 || fun(1, 2) || fun(2, 3) || fun(1, 3)) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
  return 0;
}
