#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> v;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  int test = 0;
  for (int i = 1; i < n - 1; i++) {
    if ((v[i - 1] + v[i] > v[i + 1]) && (v[i - 1] + v[i + 1] > v[i]) &&
        (v[i - 1] + v[i + 1] > v[i - 1])) {
      test = 1;
      break;
    }
  }
  if (test)
    cout << "YES";
  else
    cout << "NO";
}
