#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
struct node {
  long long x, y;
} p[maxn];
bool flag[maxn];
int n;
bool check(int x, int y) {
  memset(flag, 0, sizeof flag);
  flag[x] = flag[y] = 1;
  long long now = x;
  long long xx = p[y].x - p[x].x;
  long long yy = p[y].y - p[x].y;
  for (int i = 1; i <= n; i++) {
    if (!flag[i])
      if (xx * (p[i].y - p[now].y) == yy * (p[i].x - p[now].x)) flag[i] = 1;
  }
  int happy = 1;
  for (int i = 1; i <= n; i++) {
    if (!flag[i]) {
      for (int j = i + 1; j <= n; j++) {
        if (!flag[j]) {
          xx = p[j].x - p[i].x;
          yy = p[j].y - p[i].y;
          now = i;
          for (int w = j + 1; w <= n; w++) {
            if (!flag[w]) {
              if (xx * (p[w].y - p[now].y) != yy * (p[w].x - p[now].x)) {
                happy = 0;
                break;
              }
            }
          }
          break;
        }
      }
      break;
    }
  }
  return happy;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i].x >> p[i].y;
  if (n <= 4)
    cout << "YES" << endl;
  else {
    if (check(1, 2) || check(1, 3) || check(2, 3))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
