#include <bits/stdc++.h>
using namespace std;
using namespace std;
double INF = 1e100;
double EPS = 1e-12;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  PT(const PT &p) : x(p.x), y(p.y) {}
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
  PT operator*(double c) const { return PT(x * c, y * c); }
  PT operator/(double c) const { return PT(x / c, y / c); }
};
double dot(PT p, PT q) { return p.x * q.x + p.y * q.y; }
double dist2(PT p, PT q) { return dot(p - q, p - q); }
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
PT RotateCCW90(PT p) { return PT(-p.y, p.x); }
PT RotateCW90(PT p) { return PT(p.y, -p.x); }
PT RotateCCW(PT p, double t) {
  return PT(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));
}
PT ProjectPointLine(PT a, PT b, PT c) {
  return a + (b - a) * dot(c - a, b - a) / dot(b - a, b - a);
}
PT ProjectPointSegment(PT a, PT b, PT c) {
  double r = dot(b - a, b - a);
  if (fabs(r) < EPS) return a;
  r = dot(c - a, b - a) / r;
  if (r < 0) return a;
  if (r > 1) return b;
  return a + (b - a) * r;
}
double DistancePointSegment(PT a, PT b, PT c) {
  return sqrt(dist2(c, ProjectPointSegment(a, b, c)));
}
double DistancePointPlane(double x, double y, double z, double a, double b,
                          double c, double d) {
  return fabs(a * x + b * y + c * z - d) / sqrt(a * a + b * b + c * c);
}
bool LinesParallel(PT a, PT b, PT c, PT d) {
  return fabs(cross(b - a, c - d)) < EPS;
}
bool LinesCollinear(PT a, PT b, PT c, PT d) {
  return LinesParallel(a, b, c, d) && fabs(cross(a - b, a - c)) < EPS &&
         fabs(cross(c - d, c - a)) < EPS;
}
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;
  PT pp1(X1, Y1);
  PT pp2(X2, Y2);
  return LinesCollinear(PT(0, 0), pp1, PT(0, 0), pp2);
}
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;
}
