#include <bits/stdc++.h>
using namespace std;
long long d = 1, x = 1, y = 1;
long long power(long long x, long long y);
long long eg(long long a, long long b);
long long maxr(vector<long long> v, long long k);
bool isprime(long long n);
vector<long long> aaja(long long n);
vector<long long> soe(long long n);
void eeg(long long a, long long b);
vector<long long> aaja(long long n) {
  long long i, j;
  vector<long long> v;
  for (i = 0; i < n; i++) {
    cin >> j;
    v.push_back(j);
  }
  return v;
}
long long mjekrtehai() {
  long long i, j, k, l, n, m;
  cin >> n;
  vector<long long> v;
  v = aaja(n);
  sort(v.begin(), v.end());
  for (i = v.size() - 1; i > 1; i--) {
    if (v[i] < v[i - 1] + v[i - 2]) {
      cout << "YES"
           << "\n";
      return 0;
    }
  }
  cout << "NO"
       << "\n";
  return 0;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) mjekrtehai();
  return 0;
}
