#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
};
struct line {
  long long a, b, c;
};
line calculate_line(point a, point b) {
  line result;
  result.a = a.y - b.y;
  result.b = b.x - a.x;
  result.c = a.x * b.y - a.y * b.x;
  return result;
}
bool same_line(line& l, point p) { return (l.a * p.x + l.b * p.y + l.c == 0); }
bool one_line(vector<point>::iterator begin, vector<point>::iterator end) {
  line hip_line = calculate_line(*begin, *(begin + 1));
  for (; begin != end; ++begin) {
    if (!same_line(hip_line, *begin)) return false;
  }
  return true;
}
bool is_fine(line& l, point* points, int n) {
  vector<point> fallen;
  for (int i = 0; i < n; ++i) {
    if (!same_line(l, points[i])) fallen.push_back(points[i]);
  }
  if (fallen.size() <= 2) return true;
  return one_line(fallen.begin(), fallen.end());
}
int main() {
  int n;
  cin >> n;
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  }
  point* points = new point[n];
  for (int i = 0; i < n; ++i) {
    cin >> points[i].x >> points[i].y;
  }
  line hip1, hip2, hip3;
  hip1 = calculate_line(points[0], points[1]);
  hip2 = calculate_line(points[0], points[2]);
  hip3 = calculate_line(points[2], points[1]);
  if (is_fine(hip1, points, n) || is_fine(hip2, points, n) ||
      is_fine(hip3, points, n))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
