#include <bits/stdc++.h>
using namespace std;
int n;
double p[1100];
int check(double k) {
  set<double> q;
  for (int i = 1; i <= n; i++) {
    q.insert(p[i] - k * i);
  }
  return q.size() == 2;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) {
      scanf("%lf", &p[i]);
    }
    if (check(p[2] - p[1]) || check(p[3] - p[2]) || check((p[3] - p[1]) / 2))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
