#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
struct node {
  long long x, y;
};
int n;
node a[N];
bool bb[N];
vector<int> v;
bool dis(int i, int p, int q) {
  if ((a[i].y - a[p].y) * (a[i].x - a[q].x) ==
      (a[i].y - a[q].y) * (a[i].x - a[p].x))
    return 1;
  return 0;
}
bool gao(int p, int q) {
  for (int i = 1; i <= n; i++) {
    if (i != p && i != q) {
      int flag = dis(i, p, q);
      if (flag) return 1;
    }
  }
  return 0;
}
int main(int argc, const char* argv[]) {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &a[i].x, &a[i].y);
  }
  if (n <= 3) {
    printf("YES\n");
    exit(0);
  }
  bool b = gao(1, 3);
  v.clear();
  if (b) {
    bb[1] = 1;
    bb[3] = 1;
    for (int i = 1; i <= n; i++) {
      if (i != 1 && i != 3)
        if (dis(i, 1, 3)) bb[i] = 1;
    }
    for (int i = 1; i <= n; i++) {
      if (!bb[i]) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        printf("NO\n");
        exit(0);
      }
    }
    printf("YES\n");
    exit(0);
  } else {
    for (int i = 1; i <= n; i++) {
      if (i != 1 && i != 3) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    int flag = 0;
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        flag = 1;
        break;
      }
    }
    if (!flag) {
      printf("YES\n");
      exit(0);
    }
  }
  b = gao(2, 3);
  v.clear();
  if (b) {
    bb[2] = 1;
    bb[3] = 1;
    for (int i = 1; i <= n; i++) {
      if (i != 2 && i != 3)
        if (dis(i, 2, 3)) bb[i] = 1;
    }
    for (int i = 1; i <= n; i++) {
      if (!bb[i]) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        printf("NO\n");
        exit(0);
      }
    }
    printf("YES\n");
    exit(0);
  } else {
    v.clear();
    for (int i = 1; i <= n; i++) {
      if (i != 3 && i != 2) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    int flag = 0;
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        flag = 1;
        break;
      }
    }
    if (!flag) {
      printf("YES\n");
      exit(0);
    }
  }
  b = gao(1, 2);
  v.clear();
  if (b) {
    v.clear();
    bb[1] = 1;
    bb[2] = 1;
    for (int i = 1; i <= n; i++) {
      if (i != 1 && i != 2)
        if (dis(i, 1, 2)) bb[i] = 1;
    }
    for (int i = 1; i <= n; i++) {
      if (!bb[i]) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        printf("NO\n");
        exit(0);
      }
    }
    printf("YES\n");
    exit(0);
  } else {
    v.clear();
    for (int i = 1; i <= n; i++) {
      if (i != 1 && i != 2) v.push_back(i);
    }
    if (v.size() <= 2) {
      printf("YES\n");
      exit(0);
    }
    int flag = 0;
    for (int i = 1; i < v.size() - 1; i++) {
      if (!dis(v[i - 1], v[i], v[i + 1])) {
        flag = 1;
        break;
      }
    }
    if (!flag) {
      printf("YES\n");
      exit(0);
    }
  }
  printf("NO\n");
  exit(0);
}
