#include <bits/stdc++.h>
using namespace std;
bool help(vector<int> v, int i) {
  if (v[i] + v[i + 1] > v[i + 2] && v[i] + v[i + 2] > v[i + 1] &&
      v[i + 1] + v[i + 2] > v[i])
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, x, i;
  cin >> n;
  vector<int> v;
  for (i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n - 2; i++) {
    if (help(v, i) == 1) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
