#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const long long PR = 19260817;
const long long inv2 = 500000004;
const long long inv3 = 333333336;
int n, y[1005];
bool used[1005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &y[i]);
  for (int i = 1; i < 3; i++)
    for (int j = i + 1; j <= 3; j++) {
      double k = ((double)(y[i] - y[j])) / ((double)(i - j));
      double b = (double)y[i] - (double)i * k;
      int li = 0, lj = 0;
      memset(used, false, sizeof(used));
      for (int p = 1; p <= n; p++) {
        if (fabs(k * p + b - (double)y[p]) <= EPS)
          used[p] = true;
        else {
          li = lj;
          lj = p;
        }
      }
      if (!li && !lj) {
        continue;
      } else if (!li && lj) {
        puts("Yes");
        return 0;
      }
      double tk = ((double)(y[li] - y[lj])) / ((double)(li - lj));
      if (fabs(tk - k) > EPS) continue;
      double c = (double)y[li] - (double)li * tk;
      bool fl = true;
      for (int p = 1; p <= n; p++) {
        if (!used[p]) {
          if (fabs(k * p + c - (double)y[p]) > EPS) {
            fl = false;
            break;
          }
        }
      }
      if (fl) {
        puts("Yes");
        return 0;
      }
    }
  puts("No");
  return 0;
}
