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