#include <bits/stdc++.h>
const int N = 3000010;
const long long INF = 1ll << 60;
const int inf = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
int t;
int n, m;
int a[N];
int b[N];
bool SameLine(int i, int j, int k) {
  long long dx1 = a[j] - a[i];
  long long dy1 = b[j] - b[i];
  long long dx2 = a[k] - a[i];
  long long dy2 = b[k] - b[i];
  return !(dx1 * dy2 - dx2 * dy1);
}
bool Ok(int id1, int id2) {
  int id3 = -1, id4 = -1;
  bool flag = true;
  for (int i = 1; i <= n; ++i) {
    if (!SameLine(id1, id2, i)) {
      if (id3 == -1)
        id3 = i;
      else if (id4 == -1)
        id4 = i;
      else {
        if (!SameLine(id3, id4, i)) {
          flag = false;
          break;
        }
      }
    }
  }
  return flag;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &a[i], &b[i]);
  }
  if (n <= 2) {
    printf("YES\n");
  } else {
    if (Ok(1, 2) || Ok(1, 3) || Ok(2, 3))
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
