#include <bits/stdc++.h>
using namespace std;
long long i, j;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  double x[n + 1], y[n + 1];
  for (i = 1; i <= n; i++) {
    double tmp;
    cin >> tmp;
    x[i] = i;
    y[i] = tmp;
  }
  long long f1 = 1;
  double m1 = (y[2] - y[1]) / (x[2] - x[1]);
  vector<long long> v1;
  for (i = 2; i <= n; i++) {
    double tmp = (y[i] - y[1]) / (x[i] - x[1]);
    if (tmp != m1) v1.push_back(i);
  }
  if (v1.size() == 0)
    f1 = 0;
  else if (v1.size() > 1) {
    for (i = 1; i < v1.size(); i++) {
      double tmp = (y[v1[i]] - y[v1[0]]) / (x[v1[i]] - x[v1[0]]);
      if (tmp != m1) f1 = 0;
    }
  }
  long long f2 = 1;
  double m2 = (y[2] - y[3]) / (x[2] - x[3]);
  vector<long long> v2;
  for (i = 1; i <= n; i++) {
    if (i != 2) {
      double tmp = (y[i] - y[2]) / (x[i] - x[2]);
      if (tmp != m2) v2.push_back(i);
    }
  }
  if (v2.size() == 0)
    f2 = 0;
  else if (v2.size() > 1) {
    for (i = 1; i < v2.size(); i++) {
      double tmp = (y[v2[i]] - y[v2[0]]) / (x[v2[i]] - x[v2[0]]);
      if (tmp != m2) f2 = 0;
    }
  }
  long long f3 = 1;
  double m3 = (y[3] - y[1]) / (x[3] - x[1]);
  vector<long long> v3;
  for (i = 2; i <= n; i++) {
    double tmp = (y[i] - y[1]) / (x[i] - x[1]);
    if (tmp != m3) v3.push_back(i);
  }
  if (v3.size() == 0)
    f3 = 0;
  else if (v3.size() > 1) {
    for (i = 1; i < v3.size(); i++) {
      double tmp = (y[v3[i]] - y[v3[0]]) / (x[v3[i]] - x[v3[0]]);
      if (tmp != m3) f3 = 0;
    }
  }
  if (f1 || f2 || f3)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
