#include <bits/stdc++.h>
using namespace std;
int n;
long long num[2000];
pair<long long, long long> ans[2];
bool flag[2] = {true, true};
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
  }
  for (int i = 1; i < n; i++) {
    int mark = false;
    flag[0] = flag[1] = true;
    for (int j = 1; j < n; j++) {
      if (i == j) continue;
      if (!mark) {
        long long x = j, y = num[j] - num[0];
        long long d = gcd(x, y);
        x /= d;
        y /= d;
        if (x < 0) x = -x, y = -y;
        ans[0] = make_pair(x, y);
        x = j - i;
        y = num[j] - num[i];
        d = gcd(x, y);
        x /= d;
        y /= d;
        if (x < 0) x = -x, y = -y;
        ans[1] = make_pair(x, y);
        mark = true;
        if (ans[0] == ans[1]) break;
      } else {
        pair<long long, long long> u, v;
        long long x = j, y = num[j] - num[0];
        long long d = gcd(x, y);
        x /= d;
        y /= d;
        if (x < 0) x = -x, y = -y;
        u = make_pair(x, y);
        x = j - i;
        y = num[j] - num[i];
        d = gcd(x, y);
        x /= d;
        y /= d;
        if (x < 0) x = -x, y = -y;
        v = make_pair(x, y);
        if (ans[0] != u && ans[0] != v) {
          flag[0] = false;
        }
        if (ans[1] != u && ans[1] != v) {
          flag[1] = false;
        }
      }
    }
    if (ans[0] != ans[1] && (flag[0] || flag[1])) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
