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