#include <bits/stdc++.h>
using namespace std;
int n;
bool bj[300010];
struct node {
  long long x, y;
} a[300010];
long long xie(node a, node b, node c) {
  return (long long)(a.x - c.x) * (b.y - c.y) -
         (long long)(b.x - c.x) * (a.y - c.y);
}
bool check(node x, node y) {
  std::vector<node> b;
  for (register int i = (1); i <= (n); i = -(~i))
    if (xie(x, y, a[i])) b.push_back(a[i]);
  if (b.size() <= 2) return 1;
  for (register int i = (2); i <= (b.size() - 1); i = -(~i))
    if (xie(b[0], b[1], b[i])) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  for (register int i = (1); i <= (n); i = -(~i))
    scanf("%I64d%I64d", &a[i].x, &a[i].y);
  if (check(a[1], a[2]) || check(a[1], a[3]) || check(a[2], a[3]))
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
