#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int s, b, f = 0;
  for (i = 0; i < n - 1; i++) {
    s = a[i] + a[i + 1];
    b = abs(a[i] - a[i + 1]);
    for (j = i + 2; j < n; j++) {
      if (a[j] > b && a[j] < s) {
        f = 1;
        break;
      }
    }
    if (f == 1) break;
  }
  if (f == 1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
