#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const int mod = 1e9 + 7;
const int Lim = 1e5 + 1e3;
const double eps = 1e-9;
int main() {
  int n;
  cin >> n;
  pair<int, int> points[n];
  for (int i = 0, _n = (int)n; i < _n; i++) {
    cin >> points[i].second;
    points[i].first = i + 1;
  }
  int flag = 0;
  for (int i = (int)1, _b = (int)n - 1; i <= _b; i++) {
    double slope = ((double)(points[i].second - points[0].second)) /
                   (points[i].first - points[0].first);
    std::vector<double> dispoints;
    for (int j = 0, _n = (int)n; j < _n; j++) {
      double value = points[j].second - points[j].first * slope;
      if (dispoints.size() == 0)
        dispoints.push_back(value);
      else if (dispoints.size() == 1) {
        if (abs(dispoints[0] - value) <= eps)
          continue;
        else
          dispoints.push_back(value);
      } else {
        if (abs(dispoints[0] - value) <= eps) continue;
        if (abs(dispoints[1] - value) <= eps) continue;
        dispoints.push_back(value);
      }
    }
    if (dispoints.size() == 2) flag = 1;
  }
  double slope = ((double)(points[2].second - points[1].second)) /
                 (points[2].first - points[1].first);
  std::vector<double> dispoints;
  for (int j = 0, _n = (int)n; j < _n; j++) {
    double value = points[j].second - points[j].first * slope;
    if (dispoints.size() == 0)
      dispoints.push_back(value);
    else if (dispoints.size() == 1) {
      if (abs(dispoints[0] - value) <= eps)
        continue;
      else
        dispoints.push_back(value);
    } else {
      if (abs(dispoints[0] - value) <= eps) continue;
      if (abs(dispoints[1] - value) <= eps) continue;
      dispoints.push_back(value);
    }
  }
  if (dispoints.size() == 2) flag = 1;
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
