#include <bits/stdc++.h>
using namespace std;
long long Tc, a, b, n, item;
int main() {
  cin >> n;
  vector<long long> vec;
  for (int i = 0; i < n; i++) {
    cin >> item;
    vec.push_back(item);
  }
  sort(vec.begin(), vec.end());
  for (int i = 1; i < n - 1; i++) {
    if (vec[i - 1] + vec[i] > vec[i + 1]) {
      cout << "YES"
           << "\n";
      return 0;
    }
  }
  cout << "NO"
       << "\n";
}
