#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 100010;
const double eps = 1e-8;
int N;
int a[maxn];
int main() {
  while (scanf("%d", &N) != EOF) {
    for (int i = 0; i < N; i++) scanf("%d", &a[i]);
    sort(a, a + N);
    bool flag = false;
    for (int i = 0; i < N - 2; i++) {
      if (a[i] + a[i + 1] > a[i + 2] && a[i + 2] - a[i + 1] < a[i]) {
        flag = true;
        break;
      }
    }
    printf("%s\n", flag ? "YES" : "NO");
  }
  return 0;
}
