#include <bits/stdc++.h>
using namespace std;
bool check(pair<int, int> p1, pair<int, int> p2, pair<int, int> p3) {
  long long X1 = p2.first - p1.first;
  long long Y1 = p2.second - p1.second;
  long long X2 = p3.first - p1.first;
  long long Y2 = p3.second - p1.second;
  if (X1 * Y2 - X2 * Y1 == 0)
    return 1;
  else
    return 0;
}
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
bool check2(vector<pair<int, int> > vpi) {
  bool finalans = false;
  for (int i = 1; i < vpi.size(); i++) {
    vector<int> flg(vpi.size(), 0);
    for (int j = 0; j < vpi.size(); j++) {
      bool b = check(vpi[0], vpi[i], vpi[j]);
      if (b) flg[j] = 1;
    }
    int k = find(flg.begin(), flg.end(), 0) - flg.begin();
    if (k == flg.size()) continue;
    int k2 = find(flg.begin() + k + 1, flg.end(), 0) - flg.begin();
    if (k2 == flg.size()) {
      finalans = true;
      break;
    }
    auto p1 = vpi[0] - vpi[i];
    auto p2 = vpi[k] - vpi[k2];
    if (!check(make_pair(0, 0), p1, p2)) continue;
    bool ok = true;
    for (int j = 0; j < flg.size(); j++) {
      if (flg[j] == 0 && !check(vpi[k], vpi[k2], vpi[j])) {
        ok = false;
        break;
      }
    }
    if (ok) finalans = true;
    if (finalans) break;
  }
  return finalans;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > vpi;
  for (int i = 0; i < n; i++) {
    int z;
    cin >> z;
    vpi.push_back(make_pair(i, z));
  }
  bool fa1 = check2(vpi);
  swap(vpi[0], vpi[1]);
  bool fa2 = check2(vpi);
  if (fa1 || fa2) {
    cout << "Yes" << endl;
  } else
    cout << "No" << endl;
  return 0;
}
