#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long double INF = 1000007.7;
long long n;
bool mark[N];
pair<int, int> ar[N];
long double shib(long long i, long long j) {
  long long x1 = ar[i].first, y1 = ar[i].second, x2 = ar[j].first,
            y2 = ar[j].second;
  if (x1 == x2) {
    return (long double)INF;
  } else if (y1 < y2) {
    long double sh = (long double)(y2 - y1) / (long double)(x2 - x1);
    return sh;
  } else if (y1 == y2) {
    return 0.0;
  } else {
    long double sh = (long double)(y1 - y2) / (long double)(x1 - x2);
    return sh;
  }
}
void t(long long x1, long long y1, long long x2, long long y2, long long x3,
       long long y3, long long a, long long b) {
  memset(mark, 0, sizeof mark);
  long double sh = shib(a, b);
  mark[a] = mark[b] = 1;
  for (long long i = 0; i < n; i++)
    if (shib(a, i) == sh) mark[i] = 1;
  vector<long long> tmp;
  for (long long i = 0; i < n; i++)
    if (!mark[i]) tmp.push_back(i);
  if (tmp.size() < 3) {
    cout << "YES";
    exit(0);
  }
  long double sh2 = shib(tmp[0], tmp[1]);
  for (long long i = 2; i < tmp.size(); i++) {
    if (shib(tmp[0], tmp[i]) != sh2) return;
  }
  cout << "YES";
  exit(0);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  ;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> ar[i].first >> ar[i].second;
  if (n <= 4) return cout << "YES", 0;
  int a, b, c;
  if (shib(n - 1, n - 2) != shib(n - 2, n - 3))
    a = n - 1, b = n - 2, c = n - 3;
  else {
    while (n > 4) {
      if (shib(n - 1, n - 2) != shib(n - 2, n - 3)) {
        a = n - 1, b = n - 2, c = n - 3;
        break;
      } else
        n--;
    }
    if (n <= 4) return cout << "YES", 0;
  }
  t(ar[a].first, ar[a].second, ar[c].first, ar[c].second, ar[b].first,
    ar[b].second, a, c);
  t(ar[a].first, ar[a].second, ar[b].first, ar[b].second, ar[c].first,
    ar[c].second, a, b);
  t(ar[c].first, ar[c].second, ar[b].first, ar[b].second, ar[a].first,
    ar[a].second, b, c);
  cout << "NO";
}
