#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 1e5 + 7, INF = 0x3f3f3f3f;
long long fpow(long long a, long long b) {
  long long ans = 1LL;
  while (b) {
    if (b & 1) ans = ans * a;
    b >>= 1;
    a = a * a;
  }
  return ans;
}
int n;
struct node {
  long long x, y;
  bool operator<(const node &p) const { return x == p.x ? y < p.y : x < p.x; }
} p[N];
bool v[N];
bool check(node a, node b) {
  for (int i = 1; i <= n; i++)
    v[i] = ((long long)(a.y - p[i].y) * (b.x - p[i].x) -
                (long long)(b.y - p[i].y) * (a.x - p[i].x) ==
            0LL);
  int pos1 = 0, pos2 = 0;
  for (int i = 1; i <= n; i++)
    if (!v[i]) {
      if (pos1 == 0)
        pos1 = i;
      else if (pos2 == 0)
        pos2 = i;
      else if ((long long)(p[pos1].y - p[i].y) * (p[pos2].x - p[i].x) -
                   (long long)(p[pos2].y - p[i].y) * (p[pos1].x - p[i].x) !=
               0LL)
        return false;
    }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i].x >> p[i].y;
  if (n < 5) {
    cout << "YES\n";
    ;
    return 0;
  }
  if (check(p[1], p[2]) || check(p[1], p[3]) || check(p[2], p[3]))
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
