#include <bits/stdc++.h>
using namespace std;
const long long N = 1234567;
const long long inf = 1e9;
const double eps = 1e-12;
inline long long chkmax(long long &x, long long y) {
  if (x > y) x = y;
}
inline long long chkmin(long long &x, long long y) {
  if (x < y) x = y;
}
inline long long read() {
  long long p = 0;
  long long f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    p = p * 10 + ch - '0';
    ch = getchar();
  }
  return p * f;
}
struct node {
  long long x, y;
} p[N];
long long n;
long long del(long long i, long long j, long long k) {
  long long x1 = p[j].x - p[i].x;
  long long x2 = p[k].x - p[i].x;
  long long y1 = p[j].y - p[i].y;
  long long y2 = p[k].y - p[i].y;
  return x1 * y2 - x2 * y1;
}
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) cin >> p[i].x >> p[i].y;
  if (n <= 4) {
    printf("YES\n");
    return 0;
  }
  long long x1 = 0, y1 = 0, x2 = 0, y2 = 0;
  for (long long i = 1; i <= min(n, 100ll); i++)
    for (long long j = 1; j <= min(n, 100ll); j++)
      for (long long k = 1; k <= min(n, 100ll); k++)
        if (i != j && j != k && i != k)
          if (del(i, j, k) == 0) x1 = i, y1 = j;
  if (!x1 || !y1) {
    printf("NO\n");
    return 0;
  }
  for (long long i = 1; i <= n; i++) {
    if (del(x1, y1, i)) {
      if (!x2)
        x2 = i;
      else {
        y2 = i;
        break;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (del(x1, y1, i) && del(x2, y2, i)) {
      printf("NO\n");
      return 0;
    }
  }
  return printf("YES\n"), 0;
}
