#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  a = abs(a);
  b = abs(b);
  return a == 0 ? b : gcd(b % a, a);
}
pair<int, int> getSlope(pair<int, int> a, pair<int, int> b) {
  if (a.first > b.first) swap(a, b);
  if (a.second > b.second) swap(a, b);
  int dx = a.first - b.first;
  int dy = a.second - b.second;
  int g = gcd(dx, dy);
  dx /= g;
  dy /= g;
  if (dx < 0) {
    dx = -dx;
    dy = -dy;
  }
  return pair<int, int>(dx, dy);
}
bool ok(int x, int y, const pair<int, int> inp[], int n) {
  pair<int, int> a = inp[x];
  pair<int, int> b = inp[y];
  pair<int, int> s = getSlope(a, b);
  bool used[n];
  memset(used, false, sizeof(used));
  used[x] = used[y] = true;
  int cnt = 2;
  for (int i = 0; i < n; i++) {
    if (used[i]) {
      continue;
    }
    if (s == getSlope(a, inp[i])) {
      used[i] = true;
      cnt++;
    }
  }
  if (n - cnt <= 2) {
    return true;
  }
  int tmp = 0;
  for (int i = 0; i < n; i++) {
    if (used[i] == false) {
      if (tmp == 0) {
        tmp++;
        a = inp[i];
        used[i] = true;
      } else if (tmp == 1) {
        b = inp[i];
        tmp++;
        used[i] = true;
        s = getSlope(a, b);
      } else {
        if (s != getSlope(a, inp[i])) {
          return false;
        }
        used[i] = true;
      }
    }
  }
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  pair<int, int> inp[n];
  for (int i = 0; i < n; i++) scanf("%d %d", &inp[i].first, &inp[i].second);
  if (n <= 2 || ok(0, 1, inp, n) || ok(0, 2, inp, n) || ok(1, 2, inp, n))
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
