#include <bits/stdc++.h>
using std::cin;
using std::cout;
template <class _Tp>
inline _Tp abs(const _Tp &x) {
  return x < 0 ? -x : x;
}
template <class _Tp>
inline _Tp max(const _Tp &a, const _Tp &b) {
  return a > b ? a : b;
}
template <class _Tp>
inline _Tp min(const _Tp &a, const _Tp &b) {
  return a < b ? a : b;
}
template <class _Tp>
inline void inc(_Tp &a, const _Tp &b) {
  if (a < b) a = b;
}
template <class _Tp>
inline void dec(_Tp &a, const _Tp &b) {
  if (a > b) a = b;
}
template <class _Tp>
inline void swp(_Tp &a, _Tp &b) {
  _Tp c = a;
  a = b;
  b = c;
}
template <class _Tp>
inline bool operator==(const _Tp &A, const _Tp &B) {
  return !memcmp(&A, &B, sizeof(_Tp));
}
inline int dcmp(const double &x) { return x > -1e-10 ? x > 1e-10 : -1; }
struct Vector {
  double x, y;
  Vector(const double &A = 0, const double &B = 0) : x(A), y(B) {}
};
inline std::istream &operator>>(std::istream &A, Vector &B) {
  A >> B.x >> B.y;
  return A;
}
inline Vector operator+(const Vector &a, const Vector &b) {
  return Vector(a.x + b.x, a.y + b.y);
}
inline Vector operator-(const Vector &a, const Vector &b) {
  return Vector(a.x - b.x, a.y - b.y);
}
inline Vector operator*(const Vector &a, const double &b) {
  return Vector(a.x * b, a.y * b);
}
inline Vector operator/(const Vector &a, const double &b) {
  return Vector(a.x / b, a.y / b);
}
inline double operator^(const Vector &a, const Vector &b) {
  return a.x * b.y - a.y * b.x;
}
inline double operator*(const Vector &a, const Vector &b) {
  return a.x * b.x + a.y * b.y;
}
inline double dis(const Vector &a, const Vector &b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
struct Circle {
  Vector O;
  double R;
  Circle() {}
  Circle(const Vector &A, const double &B) : O(A), R(B) {}
};
inline std::istream &operator>>(std::istream &A, Circle &B) {
  A >> B.R >> B.O;
  return A;
}
Vector A[100005];
int n;
bool online(const Vector &A, const Vector &B, const Vector &C) {
  return dcmp(((C - A) ^ (B - A)) / dis(A, B)) == 0;
}
bool check(Vector *P, const Vector &A, const Vector &B) {
  std::vector<int> V;
  for (int i = 1; i <= n; ++i)
    if (!online(A, B, P[i])) V.push_back(i);
  for (int i = 2; i < (int)V.size(); ++i)
    if (!online(P[V[0]], P[V[1]], P[V[i]])) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  if (n <= 4) return !printf("YES\n");
  for (int i = 1; i <= n; ++i) scanf("%lf%lf", &A[i].x, &A[i].y);
  if (check(A, A[1], A[2]) || check(A, A[1], A[3]) || check(A, A[2], A[3]))
    return !printf("YES\n");
  return !printf("NO\n");
}
