#include <bits/stdc++.h>
using namespace std;
constexpr int inf32 = 0x3f3f3f3f;
constexpr long long inf64 = 0x3f3f3f3f3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  srand(time(0));
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i].first >> a[i].second;
  if (n <= 4) return !(cout << "YES\n");
  bool res = false;
  for (int t = 0; t < (20); ++t) {
    if ([&]() {
          random_shuffle((a).begin(), (a).end());
          vector<pair<int, int> > b;
          for (int i = 2; i < n; ++i) {
            if (1ll * (a[i].first - a[0].first) * (a[1].second - a[0].second) !=
                1ll * (a[1].first - a[0].first) * (a[i].second - a[0].second))
              b.push_back(a[i]);
          }
          int m = (int)((b).size());
          if (m <= 2) return true;
          for (int i = 2; i < m; ++i) {
            if (1ll * (b[i].first - b[0].first) * (b[1].second - b[0].second) !=
                1ll * (b[1].first - b[0].first) * (b[i].second - b[0].second))
              return false;
          }
          return true;
        }())
      return !(cout << "YES\n");
  }
  cout << "NO\n";
  return 0;
}
