#include <bits/stdc++.h>
using namespace std;
inline int rint() {
  int a;
  scanf("%d", &a);
  return a;
}
inline long long rll() {
  long long a;
  scanf("%lld", &a);
  return a;
}
inline double rdouble() {
  double a;
  scanf("%lf", &a);
  return a;
}
long long gcd(long long a, long long b) { return (b) ? gcd(b, a % b) : a; }
int n;
pair<long long, long long> p[100005];
long long X(int i, int j, int k) {
  long long x1 = p[i].first - p[j].first;
  long long x2 = p[i].first - p[k].first;
  long long y1 = p[i].second - p[j].second;
  long long y2 = p[i].second - p[k].second;
  return abs(x1 * y2 - x2 * y1);
}
vector<int> v;
bool slove(int a, int b) {
  v.clear();
  for (int i = 1; i <= n; i++)
    if (X(i, a, b) != 0) v.push_back(i);
  if (v.size() <= 2) return true;
  for (int i = 2; i < v.size(); i++) {
    if (X(v[i], v[0], v[1]) != 0) return false;
  }
  return true;
}
int main() {
  n = rint();
  for (int i = 1; i <= n; i++) p[i].first = rll(), p[i].second = rll();
  if (n <= 3) {
    cout << "YES" << endl;
    return 0;
  }
  int bu = -1;
  for (int i = 3; i <= n; i++)
    if (X(i, 1, 2) != 0) {
      bu = i;
      break;
    }
  if (bu == -1) {
    cout << "YES" << endl;
    return 0;
  }
  if (slove(1, 2)) {
    cout << "YES" << endl;
    return 0;
  }
  if (slove(1, bu)) {
    cout << "YES" << endl;
    return 0;
  }
  if (slove(2, bu)) {
    cout << "YES" << endl;
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
