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