#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n;
bool f[N];
struct node {
  long long x, y;
} t[N];
inline long long gi() {
  long long a = 0;
  char x = getchar();
  bool f = 0;
  while ((x < '0' || x > '9') && x != '-') x = getchar();
  if (x == '-') x = getchar(), f = 1;
  while (x >= '0' && x <= '9') a = (a << 3) + (a << 1) + x - 48, x = getchar();
  return f ? -a : a;
}
inline bool check(int p, int q) {
  for (int(i) = (1); (i) <= (n); (i)++)
    f[i] = ((t[p].x - t[i].x) * (t[q].y - t[i].y) ==
                    (t[p].y - t[i].y) * (t[q].x - t[i].x)
                ? 1
                : 0);
  int l = 0, r = 0;
  for (int(i) = (1); (i) <= (n); (i)++)
    if (!f[i]) {
      if (!l)
        l = i;
      else if (!r)
        r = i;
      else {
        if ((t[l].x - t[i].x) * (t[r].y - t[i].y) !=
            (t[l].y - t[i].y) * (t[r].x - t[i].x))
          return 0;
      }
    }
  return 1;
}
int main() {
  n = gi();
  for (int(i) = (1); (i) <= (n); (i)++) t[i].x = gi(), t[i].y = gi();
  if (n <= 4)
    puts("YES");
  else
    puts(check(1, 2) || check(1, 3) || check(2, 3) ? "YES" : "NO");
  return 0;
}
