#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x;
  long long y;
};
struct line {
  point p1;
  point p2;
};
point arr[100005];
long long n;
vector<point> s1, s2;
int check1(line l, point p) {
  return (l.p1.y - p.y) * (l.p2.x - p.x) == (l.p2.y - p.y) * (l.p1.x - p.x);
}
int check2(line l) {
  long long i;
  line l2;
  for (i = 0; i < n; i++) {
    if (check1(l, arr[i])) continue;
    if (s2.size() == 2) {
      if (!check1(l2, arr[i])) return 0;
    } else {
      s2.push_back(arr[i]);
      if (s2.size() == 2) l2.p1 = s2[0], l2.p2 = s2[1];
    }
  }
  return 1;
}
int main() {
  cin >> n;
  long long i, j;
  line temp1, temp2;
  for (i = 0; i < n; i++) cin >> arr[i].x >> arr[i].y;
  if (n <= 3)
    cout << "YES";
  else {
    temp1.p1 = arr[0];
    temp1.p2 = arr[1];
    if (check2(temp1))
      cout << "YES";
    else {
      s2.clear();
      temp1.p1 = arr[0];
      temp1.p2 = arr[2];
      if (check2(temp1))
        cout << "YES";
      else {
        s2.clear();
        temp1.p1 = arr[1];
        temp1.p2 = arr[2];
        if (check2(temp1))
          cout << "YES";
        else
          cout << "NO";
      }
    }
  }
}
