#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int x[N], y[N];
vector<int> xx;
vector<int> yy;
int n;
bool sameline(int tar, int p1, int p2) {
  return 1LL * (y[tar] - yy[p1]) * (x[tar] - xx[p2]) ==
         1LL * (y[tar] - yy[p2]) * (x[tar] - xx[p1]);
}
bool check(int p1, int p2, int p3, int p4) {
  for (int i = 1; i <= n; i++) {
    if (!sameline(i, p1, p2) && !sameline(i, p3, p4)) return false;
  }
  return true;
}
int main() {
  int flag;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d %d", &x[i], &y[i]);
  if (n <= 4) {
    printf("YES\n");
    return 0;
  }
  xx.push_back(x[1]);
  yy.push_back(y[1]);
  xx.push_back(x[2]);
  yy.push_back(y[2]);
  for (int i = 3; i <= n; i++) {
    flag = 1;
    for (int j = 0; j < xx.size() - 1; j++) {
      for (int k = j + 1; k < xx.size(); k++) {
        if (1LL * (y[i] - yy[j]) * (x[i] - xx[k]) ==
            1LL * (y[i] - yy[k]) * (x[i] - xx[j])) {
          flag = 0;
          break;
        }
      }
    }
    if (flag) {
      xx.push_back(x[i]);
      yy.push_back(y[i]);
    }
    if (xx.size() == 4) break;
  }
  if (xx.size() == 2)
    printf("YES\n");
  else if (xx.size() == 3) {
    if (check(0, 1, 1, 2) || check(0, 1, 0, 2) || check(0, 2, 1, 2))
      printf("YES\n");
    else
      printf("NO\n");
  } else {
    if (check(0, 1, 2, 3) || check(0, 2, 1, 3) || check(0, 3, 1, 2))
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
