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