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