#include <bits/stdc++.h>
long long z = 2468776129;
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long c = power(a, b / 2);
  if (b % 2 == 0)
    return ((c * c) % z);
  else
    return ((((c * c) % z) * a) % z);
}
long long inverse(long long a, long long n) { return power(a, n - 2); }
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
using namespace std;
long long n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  long long vis[n];
  for (long long i = 0; i < n; i++) {
    vis[i] = 0;
  }
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  }
  long long ff = 0, slope_1, ind;
  for (long long i = 0; i < 3; i++) {
    int flag = 0;
    vector<long long> m;
    map<long long, long long> cnt;
    for (long long j = i + 1; j < n; j++) {
      long long slope = 4000000000000000000;
      if (v[i].first != v[j].first) {
        long long num = v[i].first - v[j].first;
        long long den = v[i].second - v[j].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        slope = inverse(num, z) * den;
      }
      cnt[slope]++;
      if (cnt[slope] == 1) m.push_back(slope);
    }
    for (long long j = 0; j < m.size(); j++) {
      if (cnt[m[j]] > 1) {
        ff = 1;
        flag = 1;
        slope_1 = m[j];
        ind = i;
        break;
      }
    }
    if (flag) break;
  }
  if (ff == 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    if (i != ind) {
      long long curr_slope = 4000000000000000000;
      if (v[i].first != v[ind].first) {
        long long num = v[i].first - v[ind].first;
        long long den = v[i].second - v[ind].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        curr_slope = inverse(num, z) * den;
      }
      if (curr_slope == slope_1) vis[i] = 1;
    }
  }
  vis[ind] = 1;
  long long cn = 0;
  for (long long i = 0; i < n; i++) {
    if (vis[i] == 0) cn++;
  }
  if (cn <= 2) {
    cout << "YES" << endl;
    return 0;
  }
  ind = 0;
  while (ind < n && vis[ind] == 1) ind++;
  vector<long long> m;
  map<long long, long long> cnt;
  for (long long i = ind + 1; i < n; i++) {
    if (vis[i] == 0) {
      long long curr_slope = 4000000000000000000;
      if (v[i].first != v[ind].first) {
        long long num = v[i].first - v[ind].first;
        long long den = v[i].second - v[ind].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        curr_slope = inverse(num, z) * den;
      }
      cnt[curr_slope]++;
      if (cnt[curr_slope] == 1) m.push_back(curr_slope);
    }
  }
  if (m.size() > 1)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}

### Prompt

Please provide a CPP coded solution to the problem described below:

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>
long long z = 2468776129;
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long c = power(a, b / 2);
  if (b % 2 == 0)
    return ((c * c) % z);
  else
    return ((((c * c) % z) * a) % z);
}
long long inverse(long long a, long long n) { return power(a, n - 2); }
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
using namespace std;
long long n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    v.push_back(make_pair(a, b));
  }
  long long vis[n];
  for (long long i = 0; i < n; i++) {
    vis[i] = 0;
  }
  if (n <= 4) {
    cout << "YES" << endl;
    return 0;
  }
  long long ff = 0, slope_1, ind;
  for (long long i = 0; i < 3; i++) {
    int flag = 0;
    vector<long long> m;
    map<long long, long long> cnt;
    for (long long j = i + 1; j < n; j++) {
      long long slope = 4000000000000000000;
      if (v[i].first != v[j].first) {
        long long num = v[i].first - v[j].first;
        long long den = v[i].second - v[j].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        slope = inverse(num, z) * den;
      }
      cnt[slope]++;
      if (cnt[slope] == 1) m.push_back(slope);
    }
    for (long long j = 0; j < m.size(); j++) {
      if (cnt[m[j]] > 1) {
        ff = 1;
        flag = 1;
        slope_1 = m[j];
        ind = i;
        break;
      }
    }
    if (flag) break;
  }
  if (ff == 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    if (i != ind) {
      long long curr_slope = 4000000000000000000;
      if (v[i].first != v[ind].first) {
        long long num = v[i].first - v[ind].first;
        long long den = v[i].second - v[ind].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        curr_slope = inverse(num, z) * den;
      }
      if (curr_slope == slope_1) vis[i] = 1;
    }
  }
  vis[ind] = 1;
  long long cn = 0;
  for (long long i = 0; i < n; i++) {
    if (vis[i] == 0) cn++;
  }
  if (cn <= 2) {
    cout << "YES" << endl;
    return 0;
  }
  ind = 0;
  while (ind < n && vis[ind] == 1) ind++;
  vector<long long> m;
  map<long long, long long> cnt;
  for (long long i = ind + 1; i < n; i++) {
    if (vis[i] == 0) {
      long long curr_slope = 4000000000000000000;
      if (v[i].first != v[ind].first) {
        long long num = v[i].first - v[ind].first;
        long long den = v[i].second - v[ind].second;
        long long a = gcd(abs(num), abs(den));
        num /= a;
        den /= a;
        curr_slope = inverse(num, z) * den;
      }
      cnt[curr_slope]++;
      if (cnt[curr_slope] == 1) m.push_back(curr_slope);
    }
  }
  if (m.size() > 1)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}

```