#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
pair<int, int> point[MAX];
int n, cnt;
bool ok(pair<int, int> a, pair<int, int> b, pair<int, int> k) {
  return (long long int)(k.first - a.first) *
             (long long int)(a.second - b.second) ==
         (long long int)(k.second - a.second) *
             (long long int)(a.first - b.first);
}
void solve(int p1, int p2) {
  pair<int, int> a = point[p1], b = point[p2];
  vector<pair<int, int> > rem;
  for (int i = 0; i < n; i++)
    if (!ok(a, b, point[i])) rem.push_back(point[i]);
  if (rem.size() < 3) {
    printf("YES");
    exit(0);
  }
  bool flag = true;
  for (int i = 0; i < rem.size(); i++)
    if (!ok(rem[0], rem[1], rem[i])) flag = false;
  if (flag) {
    printf("YES");
    exit(0);
  }
  cnt++;
  if (cnt < 4) solve((p1 + 1) % 3, (p2 + 1) % 3);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &point[i].first, &point[i].second);
  if (n < 5) {
    printf("YES");
    return 0;
  }
  solve(0, 1);
  printf("NO");
  return 0;
}
