#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
int n, m, y[(int)1e5 + 20], on[(int)1e5 + 20];
double k, b, k2, b2;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> y[i];
  }
  if (n == 1) return puts("No"), 0;
  if (n == 2) return puts("Yes"), 0;
  int st = 1, ed = 2, tmp = 1;
  k2 = (double)(y[ed] - y[st]) / (double)(ed - st);
  b2 = (double)y[ed] - k2 * ed;
  tmp = 1;
  for (int j = ed + 1; j <= n; j++) {
    if (abs(k2 * j + b2 - y[j]) > 1e-10) {
      tmp = 0;
      break;
    }
  }
  if (tmp) return puts("No"), 0;
  for (int i = 1; i <= n; i++) {
    int st, ed;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      st = j;
      break;
    }
    for (int j = st + 1; j <= n; j++) {
      if (i == j) continue;
      ed = j;
      break;
    }
    k2 = (double)(y[ed] - y[st]) / (double)(ed - st);
    b2 = (double)y[ed] - k2 * ed;
    int tmp = 1;
    for (int j = ed + 1; j <= n; j++) {
      if (i == j) continue;
      if (abs(k2 * j + b2 - y[j]) > 1e-10) {
        tmp = 0;
        break;
      }
    }
    if (tmp)
      return puts("Yes"), 0;
    else
      continue;
  }
  for (int i = 2; i <= n; i++) {
    memset(on, 0, sizeof on);
    on[i] = 1;
    k = (double)(y[i] - y[1]) / (double)(i - 1);
    b = (double)y[i] - k * i;
    for (int j = 2; j <= n; j++) {
      if (i == j) continue;
      if (abs(k * j + b - y[j]) <= 1e-10) on[j] = 1;
    }
    int st, ed;
    for (int j = 2; j <= n; j++) {
      if (i == j || on[j]) continue;
      st = j;
      break;
    }
    for (int j = st + 1; j <= n; j++) {
      if (i == j || on[j]) continue;
      ed = j;
      break;
    }
    k2 = (double)(y[ed] - y[st]) / (double)(ed - st);
    b2 = (double)y[ed] - k2 * ed;
    if (abs(k2 - k) > 1e-10 || (abs(k2 - k) <= 1e-10 && abs(b2 - b) <= 1e-10))
      continue;
    int tmp = 1;
    for (int j = ed + 1; j <= n; j++) {
      if (i == j || on[j]) continue;
      if (abs(k2 * j + b2 - (double)y[j]) > 1e-10) {
        tmp = 0;
        break;
      }
    }
    if (tmp)
      return puts("Yes"), 0;
    else
      continue;
  }
  puts("No");
  return 0;
}
