#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long qk(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x;
    y >>= 1;
    x = x * x;
  }
  return ans;
}
const int dx[8] = {0, -1, 0, 1, -1, -1, 1, 1},
          dy[8] = {-1, 0, 1, 0, -1, 1, -1, 1};
const int dxx[8] = {2, 1, -1, -2, -2, -1, 1, 2},
          dyy[8] = {1, 2, 2, 1, -1, -2, -2, -1};
struct node {
  long long x, y;
} a[100005];
int b[100005];
int vis[100005];
int n;
bool xl(int i, int j, int k) {
  return (a[k].y - a[i].y) * (a[j].x - a[i].x) ==
         (a[k].x - a[i].x) * (a[j].y - a[i].y);
}
bool check(int x, int y) {
  memset(vis, 0, sizeof vis);
  vis[x] = vis[y] = 1;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (!xl(x, y, i)) {
      b[++cnt] = i;
    }
  }
  if (cnt <= 2) {
    return true;
  } else {
    for (int i = 3; i <= cnt; i++) {
      if (!xl(b[1], b[2], b[i])) {
        return false;
      }
    }
    return true;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].y;
  }
  if (n <= 4) {
    cout << "YES" << endl;
  } else {
    if (check(1, 2)) {
      cout << "YES" << endl;
    } else if (check(1, 3)) {
      cout << "YES" << endl;
    } else if (check(2, 3)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
