#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int N, A, B, C, x[maxn], y[maxn], vis[maxn], num;
bool line(int a, int b, int c) {
  if (x[a] == x[b] && x[a] == x[c]) return true;
  if (y[a] == y[b] && y[a] == y[c]) return true;
  if ((long long)(1LL * x[a] - x[b]) * (y[b] - y[c]) -
          (1LL * y[a] - y[b]) * (x[b] - x[c]) ==
      0)
    return true;
  return false;
}
bool find() {
  for (int i = 3; i <= N; i++)
    if (!line(1, 2, i)) {
      C = i;
      return true;
    }
  return false;
}
bool check(int a, int b) {
  int A = -1, B = -1;
  for (int i = 1; i <= N; i++) vis[i] = 0;
  num = 0;
  for (int i = 1; i <= N; i++)
    if (line(a, b, i))
      vis[i] = 1, num++;
    else {
      if (A == -1)
        A = i;
      else if (B == -1)
        B = i;
    }
  if (num == N || num == N - 1 || num == N - 2) return true;
  for (int i = 1; i <= N; i++)
    if (!vis[i])
      if (!line(A, B, i)) return false;
  return true;
}
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d%d", &x[i], &y[i]);
  if (!find()) return puts("YES"), 0;
  if (check(1, 2)) return puts("YES"), 0;
  if (check(1, C)) return puts("YES"), 0;
  if (check(2, C)) return puts("YES"), 0;
  puts("NO");
  return 0;
}
