#include <bits/stdc++.h>
using namespace std;
int n, d[100100];
bool check(int first, int second, int z) { return first + second > z; }
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", d + i);
  sort(d, d + n);
  for (int i = 0; i + 2 < n; i++) {
    if (check(d[i], d[i + 1], d[i + 2])) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
