#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  friend bool operator<(const Point& a, const Point& b) {
    return a.x < b.x || (a.x == b.x && a.y < b.y);
  }
};
Point operator+(Point A, Point B) { return Point(A.x + B.x, A.y + B.y); }
Point operator-(Point A, Point B) { return Point(A.x - B.x, A.y - B.y); }
Point operator*(Point A, double p) { return Point(A.x * p, A.y * p); }
Point operator/(Point A, double p) { return Point(A.x / p, A.y / p); }
const double eps = 1e-10;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
bool operator==(const Point& A, const Point& B) {
  return dcmp(A.x - B.x) == 0 && dcmp(A.y - B.y) == 0;
}
double dot(Point A, Point B) { return A.x * B.x + A.y * B.y; }
double length(Point A) { return sqrt(dot(A, A)); }
double angle(Point A, Point B) {
  return acos(dot(A, B) / length(A) / length(B));
}
double cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
Point rotate(Point A, double rad) {
  return Point(A.x * cos(rad) - A.y * sin(rad),
               A.x * sin(rad) + A.y * cos(rad));
}
bool Online(Point p, Point a1, Point a2) {
  return dcmp(cross(a1 - p, a2 - p)) == 0;
}
int n;
Point p[100005];
int rest[100005];
int tot;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%lf%lf", &p[i].x, &p[i].y);
  for (int i = 3; i <= n; i++) {
    if (!Online(p[i], p[1], p[2])) rest[tot++] = i;
  }
  bool flag = true;
  for (int i = 2; i < tot; i++) {
    if (!Online(p[rest[i]], p[rest[0]], p[rest[1]])) flag = false;
  }
  if (flag) return !printf("YES\n");
  tot = 0;
  flag = true;
  for (int i = 1; i <= n; i++) {
    if (i == 1 || i == 3) continue;
    if (!Online(p[i], p[1], p[3])) rest[tot++] = i;
  }
  for (int i = 2; i < tot; i++) {
    if (!Online(p[rest[i]], p[rest[0]], p[rest[1]])) flag = false;
  }
  if (flag) return !printf("YES\n");
  tot = 0;
  flag = true;
  for (int i = 1; i <= n; i++) {
    if (i == 2 || i == 3) continue;
    if (!Online(p[i], p[2], p[3])) rest[tot++] = i;
  }
  for (int i = 2; i < tot; i++) {
    if (!Online(p[rest[i]], p[rest[0]], p[rest[1]])) flag = false;
  }
  if (flag)
    puts("YES");
  else
    puts("NO");
  return 0;
}
