#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > a;
int n;
bool used[100009];
inline pair<int, int> operator-(const pair<int, int> &p1,
                                const pair<int, int> &p2) {
  return {p1.first - p2.first, p1.second - p2.second};
}
inline long long cross(const pair<int, int> &p1, const pair<int, int> &p2) {
  return p1.first * 1ll * p2.second - p1.second * 1ll * p2.first;
}
inline bool check() {
  int i1 = -1, i2 = -1;
  for (int i = 0; i < n; i++) {
    if (used[i]) continue;
    if (i1 == -1)
      i1 = i;
    else if (i2 == -1) {
      i2 = i;
      break;
    }
  }
  if (i2 == -1) return true;
  for (int i = 0; i < n; i++) {
    if (used[i]) continue;
    if (cross(a[i1] - a[i2], a[i1] - a[i]) != 0) return false;
  }
  return true;
}
inline bool check2(const pair<int, int> &p1, const pair<int, int> &p2) {
  memset(used, 0, sizeof(used));
  for (int i = 0; i < n; i++) {
    if (cross(p2 - p1, a[i] - p1) == 0) used[i] = 1;
  }
  return check();
}
inline void solve() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a.push_back({x, y});
  }
  if (check2(a[0], a[1]) || check2(a[0], a[2]) || check2(a[1], a[2]))
    puts("YES");
  else
    puts("NO");
}
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
