#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 10;
const double eps = 1e-6;
int a[N];
int main() {
  int n, i, j, f;
  double d, r1, r2;
  while (~scanf("%d", &n)) {
    f = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      for (j = 1; j < i; j++) {
        d = fabs((double)(a[j - 1] + a[j]) / 2.0 -
                 (double)(a[i] + a[i - 1]) / 2.0);
        r1 = fabs((double)(a[i] - a[i - 1]) / 2.0);
        r2 = fabs((double)(a[j] - a[j - 1]) / 2.0);
        if (d > fabs(r1 - r2) + eps && d + eps < fabs(r1 + r2)) f = 1;
      }
    }
    if (f == 1)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}
