#include <bits/stdc++.h>
using namespace std;
double a[1001];
bool fucked[1001];
int main() {
  int n, i, j, x, y;
  double k, b, k1, b1;
  cin >> n;
  for (i = 1; i <= n; i++) scanf("%lf", &a[i]);
  x = 1;
  y = 2;
  for (i = 1; i <= 3; i++) {
    if (a[x] == a[y]) {
      k = 0;
      b = a[x];
    } else {
      k = (a[y] - a[x]) / (y - x);
      b = (a[x] * y - a[y] * x) / (y - x);
    }
    for (j = 1; j <= n; j++)
      if (k * j + b == a[j]) fucked[j] = 1;
    for (j = 1; j <= n; j++)
      if (fucked[j] == 0) break;
    if (j > n) {
      cout << "No";
      return 0;
    }
    b1 = a[j] - k * j;
    for (j = 1; j <= n; j++)
      if (k * j + b1 == a[j]) fucked[j] = 1;
    for (j = 1; j <= n; j++)
      if (fucked[j] == 0) break;
    if (j > n) {
      cout << "Yes";
      return 0;
    }
    for (j = 1; j <= n; j++) fucked[j] = 0;
    if (i == 1)
      y++;
    else if (i == 2)
      x++;
  }
  cout << "No";
}
