#include <bits/stdc++.h>
struct Point {
  int x, y;
  Point(){};
  Point(int x, int y) : x(x), y(y){};
  void scan(int i) {
    scanf("%d", &y);
    x = i;
  }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
} p[1000];
int a[1000];
int a_n;
inline int cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
inline int ju(int i, int j, int k) { return cross(p[j] - p[i], p[k] - p[i]); }
inline int ju(Point a, Point b, Point c) { return cross(b - a, c - a); }
int main() {
  int n, i, j, k;
  while (~scanf("%d", &n) && n) {
    for (i = 0; i < n; i++) p[i].scan(i);
    a_n = 0;
    if (n == 3) {
      if (ju(0, 1, 2))
        printf("Yes\n");
      else
        printf("No\n");
      continue;
    }
    int i0, i1, i2, judge = 0, m = 5;
    if (n == 4) m = 4;
    for (i = 0; i < 3; i++)
      for (j = i + 1; j < 4; j++)
        for (k = j + 1; k < m; k++) {
          if (ju(i, j, k) == 0) {
            judge = 1;
            i1 = i;
            i2 = j;
            i0 = k;
          }
        }
    if (judge == 0) {
      if (n == 4 && ju(0, 1, 2) && ju(0, 1, 3) && ju(0, 2, 3) && ju(1, 2, 3) &&
          (ju(p[1] - p[0], p[3] - p[2], Point(0, 0)) == 0 ||
           ju(p[2] - p[0], p[3] - p[1], Point(0, 0)) == 0 ||
           ju(p[3] - p[0], p[1] - p[2], Point(0, 0)) == 0))
        printf("Yes\n");
      else
        printf("No\n");
      continue;
    }
    for (i = 0; i < n; i++) {
      if (ju(i1, i2, i) == 0) continue;
      a[a_n++] = i;
    }
    if (a_n == 0) {
      printf("No\n");
      continue;
    }
    if (a_n == 1) {
      printf("Yes\n");
      continue;
    }
    int i3 = a[0], i4 = a[1];
    if (a_n == 2) {
      if (ju(p[i4] - p[i3], p[i2] - p[i0], p[i1] - p[i0]) == 0)
        printf("Yes\n");
      else
        printf("No\n");
      continue;
    }
    if (ju(p[i4] - p[i3], p[i2] - p[i0], p[i1] - p[i0])) {
      printf("No\n");
      continue;
    }
    for (i = 2; i < a_n; i++) {
      if (ju(i3, i4, a[i])) break;
    }
    if (i < a_n)
      printf("No\n");
    else
      printf("Yes\n");
  }
  return 0;
}
