#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
struct node {
  long long x, y;
};
node p[maxn];
bool check_pair(int a, int b, int c, int n) {
  int d = -1;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (i == a || i == b || i == c) continue;
    if ((p[i].x - p[a].x) * (p[b].y - p[a].y) ==
        (p[i].y - p[a].y) * (p[b].x - p[a].x)) {
      cnt++;
    } else {
      if (d == -1)
        d = i, cnt++;
      else if ((p[i].x - p[c].x) * (p[d].y - p[c].y) ==
               (p[i].y - p[c].y) * (p[d].x - p[c].x))
        cnt++;
    }
  }
  return (cnt == n - 3);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d %I64d", &p[i].x, &p[i].y);
  if (n <= 4)
    printf("YES\n");
  else {
    int c = -1;
    for (int i = 3; i <= n; i++) {
      if ((p[i].x - p[1].x) * (p[2].y - p[1].y) !=
          (p[i].y - p[1].y) * (p[2].x - p[1].x)) {
        c = i;
        break;
      }
    }
    if (c == -1) {
      printf("YES\n");
      return 0;
    }
    bool flag1 = check_pair(1, 2, c, n);
    bool flag2 = check_pair(1, c, 2, n);
    bool flag3 = check_pair(2, c, 1, n);
    if (flag1 || flag2 || flag3)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
