#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.rbegin(), a.rend());
  bool is_valid = false;
  for (int i = 0; i < n - 2; ++i) {
    if (a[i] < a[i + 1] + a[i + 2]) {
      is_valid = true;
      break;
    }
  }
  cout << (is_valid ? "YES" : "NO") << endl;
  return 0;
}
