#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const ll N = 1e5 + 1, mod = 1e9 + 7;
struct point {
  ll x, y;
} p[N];
ll n;
bool line[N];
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (ll i = 1; i <= n; ++i) {
    cin >> p[i].x >> p[i].y;
  }
  if (n <= 4) {
    return cout << "YES", 0;
  }
  for (ll i = 1; i <= 3; ++i) {
    for (ll j = i + 1; j <= 3; ++j) {
      memset(line, 0, sizeof line);
      ll a = p[i].y - p[j].y, b = p[j].x - p[i].x;
      ll c = a * p[i].x + b * p[i].y;
      for (ll k = 1; k <= n; ++k) {
        if (a * p[k].x + b * p[k].y != c) {
          line[k] = 1;
        }
      }
      ll cnt0 = 0;
      point p1 = {INT_MAX, 0}, p2 = {INT_MAX, 0};
      for (ll k = 1; k <= n && cnt0 < 2; ++k) {
        if (line[k]) {
          if (!cnt0) {
            p1 = p[k];
          } else {
            p2 = p[k];
          }
          cnt0++;
        }
      }
      if (p1.x == INT_MAX || p2.x == INT_MAX) {
        return cout << "YES", 0;
      }
      a = p1.y - p2.y, b = p2.x - p1.x;
      c = a * p1.x + b * p1.y;
      bool yes = 1;
      for (ll k = 1; k <= n; ++k) {
        if (line[k] && a * p[k].x + b * p[k].y != c) {
          yes = 0;
        }
      }
      if (yes) {
        return cout << "YES", 0;
      }
    }
  }
  cout << "NO";
}
