#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int a[MAXN];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n - 1; i++)
    if (a[i - 1] + a[i] > a[i + 1]) return 0 * printf("YES");
  return 0 * printf("NO");
}
