#include <bits/stdc++.h>
using namespace std;
long long n;
bool viz[100000 + 10];
pair<long long, long long> v[100000 + 10];
long long area(pair<long long, long long> p1, pair<long long, long long> p2,
               pair<long long, long long> p3) {
  return (p1.first - p2.first) * (p1.second - p3.second) -
         (p1.second - p2.second) * (p1.first - p3.first);
}
int check(int i1, int i2) {
  memset(viz, 0, sizeof(viz));
  viz[i1] = viz[i2] = 1;
  pair<long long, long long> p1 = v[i1], p2 = v[i2];
  for (int i = 1; i <= n; i++)
    if (!viz[i] && !area(p1, p2, v[i])) viz[i] = 1;
  int nr = 0;
  for (int i = 1; i <= n; i++) {
    if (!viz[i]) {
      nr++;
      if (nr == 1)
        p1 = v[i];
      else
        p2 = v[i];
    }
    if (nr == 2) break;
  }
  if (nr < 2) return 1;
  for (int i = 1; i <= n; i++)
    if (!viz[i] && !area(p1, p2, v[i])) viz[i] = 1;
  for (int i = 1; i <= n; i++)
    if (!viz[i]) return 0;
  return 1;
}
int main() {
  cin >> n;
  if (n < 3) {
    cout << "YES" << '\n';
    return 0;
  }
  for (int i = 1; i <= n; i++) cin >> v[i].first >> v[i].second;
  if (check(1, 2) || check(1, 3) || check(2, 3))
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
