#include <bits/stdc++.h>
using namespace std;
const long long INF = LLONG_MAX;
const long long base = 1e9;
const double PI = acos(-1);
const long long MOD = 1e9 + 7;
const long long N = 1e5 + 10;
void solve();
bool check(long long x1, long long y1, long long x2, long long y2, long long x3,
           long long y3);
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
void solve() {
  long long n;
  cin >> n;
  pair<long long, long long> p[n];
  for (long long i = 0; i < n; ++i) {
    cin >> p[i].first >> p[i].second;
  }
  if (n < 5) {
    cout << "YES\n";
    return;
  }
  bool vis[n];
  fill(vis, vis + n, false);
  for (long long i = 2; i < n; ++i) {
    if (check(p[0].first, p[0].second, p[1].first, p[1].second, p[i].first,
              p[i].second)) {
      vis[i] = true;
    }
  }
  long long bawa = 0, teri = 0;
  pair<long long, long long> pp[2];
  for (long long i = 2; i < n; ++i) {
    if (!vis[i]) {
      if (bawa > 1) {
        ++bawa;
        teri = i;
        break;
      }
      pp[bawa] = p[i];
      ++bawa;
    }
  }
  if (bawa < 3) {
    cout << "YES\n";
    return;
  }
  long long zucker = 1;
  for (long long i = teri; i < n; ++i) {
    if (!vis[i] and !check(pp[0].first, pp[0].second, pp[1].first, pp[1].second,
                           p[i].first, p[i].second)) {
      --zucker;
      break;
    }
  }
  if (zucker) {
    cout << "YES\n";
  } else {
    fill(vis, vis + n, false);
    long long kapa = 0;
    pair<long long, long long> z;
    for (long long i = 1; i < n; ++i) {
      if (pp[1] != p[i]) {
        if (check(p[0].first, p[0].second, pp[1].first, pp[1].second,
                  p[i].first, p[i].second)) {
          vis[i] = true;
        } else {
          ++kapa;
          z = p[i];
        }
      }
    }
    if (kapa < 3) {
      cout << "YES\n";
      return;
    }
    zucker = 1;
    for (long long i = 2; i < n; ++i) {
      if (p[i] != z and p[i] != pp[1] and !vis[i] and
          !check(z.first, z.second, p[1].first, p[1].second, p[i].first,
                 p[i].second)) {
        --zucker;
        break;
      }
    }
    if (zucker) {
      cout << "YES\n";
    } else {
      fill(vis, vis + n, false);
      kapa = 0;
      pair<long long, long long> o;
      for (long long i = 0; i < n; ++i) {
        if (pp[1] != p[i] and p[1] != p[i]) {
          if (check(p[1].first, p[1].second, pp[1].first, pp[1].second,
                    p[i].first, p[i].second)) {
            vis[i] = true;
          } else {
            ++kapa;
            o = p[i];
          }
        }
      }
      if (kapa < 3) {
        cout << "YES\n";
        return;
      }
      zucker = 1;
      for (long long i = 2; i < n; ++i) {
        if (p[i] != o and p[i] != pp[1] and !vis[i] and
            !check(o.first, o.second, p[0].first, p[0].second, p[i].first,
                   p[i].second)) {
          --zucker;
          break;
        }
      }
      if (zucker) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    }
  }
  return;
}
bool check(long long x1, long long y1, long long x2, long long y2, long long x3,
           long long y3) {
  return !(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2));
}
