#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
} nd[1000005];
struct xian {
  long long x1, y1, x2, y2;
} xi[10];
vector<int> vec[10];
bool judge(int idx, int i) {
  if ((nd[idx].y - xi[i].y1) * (xi[i].x1 - xi[i].x2) ==
      (xi[i].y1 - xi[i].y2) * (nd[idx].x - xi[i].x1)) {
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> nd[i].x >> nd[i].y;
  }
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  }
  xi[1].x1 = nd[1].x;
  xi[1].y1 = nd[1].y;
  xi[1].x2 = nd[2].x;
  xi[1].y2 = nd[2].y;
  xi[2].x1 = nd[1].x;
  xi[2].y1 = nd[1].y;
  xi[2].x2 = nd[3].x;
  xi[2].y2 = nd[3].y;
  xi[3].x1 = nd[2].x;
  xi[3].y1 = nd[2].y;
  xi[3].x2 = nd[3].x;
  xi[3].y2 = nd[3].y;
  for (int i = 4; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      if (!judge(i, j)) {
        vec[j].push_back(i);
      }
    }
  }
  if (!judge(3, 1)) {
    vec[1].push_back(3);
  }
  if (!judge(2, 2)) {
    vec[2].push_back(2);
  }
  if (!judge(1, 3)) {
    vec[3].push_back(1);
  }
  bool flag = true;
  for (int i = 1; i <= 3; i++) {
    flag = true;
    int t = vec[i].size();
    for (int j = 0; j < t - 2; j++) {
      int m1 = vec[i][j];
      int m2 = vec[i][j + 1];
      int m3 = vec[i][j + 2];
      if ((nd[m3].y - nd[m1].y) * (nd[m1].x - nd[m2].x) !=
          (nd[m1].y - nd[m2].y) * (nd[m3].x - nd[m1].x)) {
        flag = false;
      }
    }
    if (flag) break;
  }
  if (flag) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
