#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long M = 1e7 + 19;
long long Max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long Min(long long a, long long b) {
  if (a > b) return b;
  return a;
}
long long big_mul(long long a, long long b, long long m) {
  long long x = 0, y = a % m;
  while (b > 0) {
    if (b & 1) x = (x + y) % m;
    y = (2 * y) % m;
    b >>= 1;
  }
  return x % m;
}
long long big_mod(long long a, long long b, long long m) {
  long long x = 1, y = a % m;
  while (b > 0) {
    if (b & 1) x = (x * y) % m;
    y = (y * y) % m;
    b >>= 1;
  }
  return x % m;
}
long long Big_mod(long long a, long long b, long long m) {
  long long x = 1, y = a % m;
  while (b > 0) {
    if (b & 1) x = big_mul(x, y, m);
    y = big_mul(y, y, m);
    b >>= 1;
  }
  return x % m;
}
long long mod_inverse(long long a, long long m) { return big_mod(a, m - 2, m); }
vector<pair<double, double> > save;
vector<pair<double, double> > tmp;
vector<bool> check(N);
int fnct(vector<pair<double, double> > &vec, int pos1, int pos2) {
  int cnt = 2;
  if (vec.size() <= 2) return vec.size();
  double p1 = vec[pos1].first;
  double q1 = vec[pos1].second;
  double p2 = vec[pos2].first;
  double q2 = vec[pos2].second;
  double Y = q2 - q1;
  double X = p2 - p1;
  double slope;
  if (X == 0)
    slope = INT_MAX;
  else
    slope = (Y / X);
  for (int i = 0; i < vec.size(); i++) {
    if (i == pos1 || i == pos2) continue;
    p1 = vec[pos1].first;
    q1 = vec[pos1].second;
    p2 = vec[i].first;
    q2 = vec[i].second;
    Y = q2 - q1;
    X = p2 - p1;
    double slope1;
    if (X == 0)
      slope1 = INT_MAX;
    else
      slope1 = (Y / X);
    if (slope1 == slope) {
      cnt++;
    } else
      check[i] = true;
  }
  return cnt;
}
bool res(int pos1, int pos2, int n) {
  for (int i = 0; i < check.size(); i++) check[i] = false;
  tmp.clear();
  int ans1 = fnct(save, pos1, pos2);
  for (int i = 0; i < n; i++) {
    if (check[i] == true)
      tmp.push_back(make_pair(save[i].first, save[i].second));
  }
  int ans2 = fnct(tmp, 0, 1);
  if (ans1 + ans2 == n) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    double a, b;
    cin >> a >> b;
    save.push_back(make_pair(a, b));
  }
  if (n < 5)
    cout << "YES" << endl;
  else {
    if (res(0, 1, n) == true)
      cout << "YES" << endl;
    else if (res(0, 2, n) == true)
      cout << "YES" << endl;
    else if (res(1, 2, n) == true)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

### Prompt

Your task is to create a cpp solution to the following problem:

You are given n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct.

You may draw two straight lines (not necessarily distinct). Is it possible to do this in such a way that every point lies on at least one of these lines?

Input

The first line contains one integer n (1 ≤ n ≤ 105) — the number of points you are given.

Then n lines follow, each line containing two integers xi and yi (|xi|, |yi| ≤ 109)— coordinates of i-th point. All n points are distinct.

Output

If it is possible to draw two straight lines in such a way that each of given points belongs to at least one of these lines, print YES. Otherwise, print NO.

Examples

Input

5
0 0
0 1
1 1
1 -1
2 2


Output

YES


Input

5
0 0
1 0
2 1
1 1
2 3


Output

NO

Note

In the first example it is possible to draw two lines, the one containing the points 1, 3 and 5, and another one containing two remaining points.

<image>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long M = 1e7 + 19;
long long Max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long Min(long long a, long long b) {
  if (a > b) return b;
  return a;
}
long long big_mul(long long a, long long b, long long m) {
  long long x = 0, y = a % m;
  while (b > 0) {
    if (b & 1) x = (x + y) % m;
    y = (2 * y) % m;
    b >>= 1;
  }
  return x % m;
}
long long big_mod(long long a, long long b, long long m) {
  long long x = 1, y = a % m;
  while (b > 0) {
    if (b & 1) x = (x * y) % m;
    y = (y * y) % m;
    b >>= 1;
  }
  return x % m;
}
long long Big_mod(long long a, long long b, long long m) {
  long long x = 1, y = a % m;
  while (b > 0) {
    if (b & 1) x = big_mul(x, y, m);
    y = big_mul(y, y, m);
    b >>= 1;
  }
  return x % m;
}
long long mod_inverse(long long a, long long m) { return big_mod(a, m - 2, m); }
vector<pair<double, double> > save;
vector<pair<double, double> > tmp;
vector<bool> check(N);
int fnct(vector<pair<double, double> > &vec, int pos1, int pos2) {
  int cnt = 2;
  if (vec.size() <= 2) return vec.size();
  double p1 = vec[pos1].first;
  double q1 = vec[pos1].second;
  double p2 = vec[pos2].first;
  double q2 = vec[pos2].second;
  double Y = q2 - q1;
  double X = p2 - p1;
  double slope;
  if (X == 0)
    slope = INT_MAX;
  else
    slope = (Y / X);
  for (int i = 0; i < vec.size(); i++) {
    if (i == pos1 || i == pos2) continue;
    p1 = vec[pos1].first;
    q1 = vec[pos1].second;
    p2 = vec[i].first;
    q2 = vec[i].second;
    Y = q2 - q1;
    X = p2 - p1;
    double slope1;
    if (X == 0)
      slope1 = INT_MAX;
    else
      slope1 = (Y / X);
    if (slope1 == slope) {
      cnt++;
    } else
      check[i] = true;
  }
  return cnt;
}
bool res(int pos1, int pos2, int n) {
  for (int i = 0; i < check.size(); i++) check[i] = false;
  tmp.clear();
  int ans1 = fnct(save, pos1, pos2);
  for (int i = 0; i < n; i++) {
    if (check[i] == true)
      tmp.push_back(make_pair(save[i].first, save[i].second));
  }
  int ans2 = fnct(tmp, 0, 1);
  if (ans1 + ans2 == n) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    double a, b;
    cin >> a >> b;
    save.push_back(make_pair(a, b));
  }
  if (n < 5)
    cout << "YES" << endl;
  else {
    if (res(0, 1, n) == true)
      cout << "YES" << endl;
    else if (res(0, 2, n) == true)
      cout << "YES" << endl;
    else if (res(1, 2, n) == true)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

```