#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
vector<int> vc;
long double x[N + 10], y[N + 10], m[10];
long double M(int i, int j) {
  if (x[i] == x[j]) return 10000 * 100000 + 1;
  return (long double)(y[i] - y[j]) / (x[i] - x[j]);
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n <= 3) return cout << "YES", 0;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  m[0] = M(0, 1);
  for (int i = 2; i < n; i++)
    if (M(0, i) != m[0]) {
      swap(x[2], x[i]), swap(y[2], y[i]);
      break;
    } else if (i == n - 1)
      return cout << "YES", 0;
  m[0] = M(1, 2), m[1] = M(0, 2), m[2] = M(0, 1), m[3] = 1e9 + 7;
  for (int k = 0; k < 3; k++)
    for (int i = 3; i < n; i++) {
      if (M((k + 1) % 3, i) != m[k]) {
        if (m[3] == 1e9 + 7)
          m[3] = M(k, i);
        else if (m[3] != M(k, i)) {
          m[3] = 1e9 + 7;
          break;
        }
      }
      if (i == n - 1) {
        return cout << "YES", 0;
      }
    }
  cout << "NO";
  return 0;
}
