#include <bits/stdc++.h>
static const int MAXN = 1004;
int n;
int y[MAXN];
bool on_first[MAXN];
bool check() {
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if ((long long)i * (y[j] - y[0]) == (long long)j * (y[i] - y[0]))
        on_first[j] = true;
      else
        on_first[j] = false;
    }
    int start_idx = -1;
    bool valid = true;
    for (int j = 0; j < n; ++j)
      if (!on_first[j]) {
        if (start_idx == -1) {
          start_idx = j;
        } else if ((long long)i * (y[j] - y[start_idx]) !=
                   (long long)(j - start_idx) * (y[i] - y[0])) {
          valid = false;
          break;
        }
      }
    if (valid && start_idx != -1) return true;
  }
  return false;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &y[i]);
  bool ans = false;
  ans |= check();
  std::reverse(y, y + n);
  ans |= check();
  puts(ans ? "Yes" : "No");
  return 0;
}
