#include <bits/stdc++.h>
const int maxn = 100000;
struct point {
  int x, y;
};
point p[maxn + 10];
int n, used[maxn + 10];
inline int one_line(int a, int b, int c) {
  if ((a == 0) || (b == 0) || (c == 0)) {
    return 1;
  }
  return 1ll * (p[c].x - p[a].x) * (p[b].y - p[a].y) ==
         1ll * (p[c].y - p[a].y) * (p[b].x - p[a].x);
}
int check(int a, int b) {
  memset(used, 0, sizeof used);
  used[a] = used[b] = 1;
  for (register int i = 1; i <= n; ++i) {
    if ((!used[i]) && (one_line(a, b, i))) {
      used[i] = 1;
    }
  }
  int u = 0, v = 0, w = 0, flag = 1;
  for (register int i = 1; i <= n; ++i) {
    if (!used[i]) {
      u = v;
      v = w;
      w = i;
      if (!one_line(u, v, w)) {
        flag = 0;
        break;
      }
    }
  }
  return flag;
}
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) {
    scanf("%d%d", &p[i].x, &p[i].y);
  }
  if (check(1, 2) || check(2, 3) || check(1, 3)) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}
