#include <bits/stdc++.h>
int A[100001], temp[100001];
int isTriangle(int a, int b, int c) {
  if ((a + b > c) && (b + c > a) && (c + a > b)) return 1;
  return 0;
}
void merge(int i1, int j1, int i2, int j2) {
  int i, j, k;
  i = i1;
  j = i2;
  k = 0;
  while (i <= j1 && j <= j2) {
    if (A[i] < A[j])
      temp[k++] = A[i++];
    else
      temp[k++] = A[j++];
  }
  while (i <= j1) temp[k++] = A[i++];
  while (j <= j2) temp[k++] = A[j++];
  for (i = i1, j = 0; i <= j2; i++, j++) A[i] = temp[j];
}
void merge_sort(int i, int j) {
  int mid;
  if (i < j) {
    mid = (i + j) / 2;
    merge_sort(i, mid);
    merge_sort(mid + 1, j);
    merge(i, mid, mid + 1, j);
  }
}
int main() {
  int i, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &A[i]);
  merge_sort(0, n - 1);
  for (i = 0; i < n - 2; i++) {
    if (isTriangle(A[i], A[i + 1], A[i + 2])) {
      printf("YES");
      goto out;
    }
  }
  printf("NO");
out:;
  return 0;
}
