#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int MX = 123456;
const int mod = (int)1e9 + 7;
const int base = 1023456789;
const unsigned long long BS1 = 10000019ULL;
const int INF = (1 << 29);
const double EPS = 1E-9;
template <class T>
inline void fastScan(T &x) {
  register char c = getchar();
  int neg = 0;
  x = 0;
  for (; (c < 48 || c > 57) && (c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, -1, 1};
long long a[2], b[2], c[2];
struct pt {
  long long x, y;
  pt() {}
  pt(long long _x, long long _y) {
    x = _x;
    y = _y;
  }
} arr[1234];
long long area(pt p, pt q, pt r) {
  long long up = p.x * q.y + q.x * r.y + r.x * p.y;
  long long down = p.y * q.x + q.y * r.x + r.y * p.x;
  up -= down;
  if (up < 0) up *= -1ll;
  return up;
}
bool Intersect() {
  long long det = a[0] * b[1] - b[0] * a[1];
  long long detx = c[0] * b[1] - b[0] * c[1];
  long long dety = b[0] * c[1] - b[1] * c[0];
  if (det == 0) return 0;
  return 1;
}
int main() {
  int n;
  fastScan(n);
  for (int i = 1; i <= n; i++) {
    long long x, y;
    x = i;
    fastScan(y);
    arr[i] = pt(x, y);
  }
  if (n < 3) {
    puts("Yes");
    return 0;
  }
  if (n == 3) {
    if (area(arr[1], arr[2], arr[3]) > 0) {
      puts("Yes");
      return 0;
    }
    puts("No");
    return 0;
  }
  for (int i = 1; i <= min(n, 3); i++) {
    for (int j = i + 1; j <= n; j++) {
      vector<pt> rest;
      for (int k = 1; k <= n; k++) {
        if (area(arr[i], arr[j], arr[k]) > 0) {
          rest.push_back(arr[k]);
        }
      }
      if (rest.size() == 1) {
        puts("Yes");
        return 0;
      }
      if (rest.size() == 0) {
        continue;
      }
      a[0] = arr[i].y - arr[j].y;
      b[0] = arr[j].x - arr[i].x;
      c[0] = arr[i].x * a[0] + arr[i].y * b[0];
      a[1] = rest[0].y - rest[1].y;
      b[1] = rest[1].x - rest[0].x;
      c[1] = rest[0].x * a[1] + rest[0].y * b[1];
      int flag = 1;
      for (int i = 2; i < rest.size(); i++) {
        if (area(rest[0], rest[1], rest[i]) > 0) {
          flag = 0;
        }
      }
      if (Intersect() == 0 && flag == 1) {
        puts("Yes");
        return 0;
      }
    }
  }
  puts("No");
}
