#include <bits/stdc++.h>
using namespace std;
long long inf = 1e18 + 9;
long long n, m, k = 0, t = 1, x, y, z, l, r, w, d, q, ct = 0, ans = 0, f = 0;
string s, p;
set<long long> si;
map<long long, long long> mi;
const long long mod = 10;
signed main() {
  cin >> n;
  long long a[n + 1];
  for (long long i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (long long i = 1; i <= n; i++)
    if (i > 2)
      if (a[i] < a[i - 1] + a[i - 2]) {
        cout << "YES"
             << "\n";
        return 0;
      }
  cout << "NO"
       << "\n";
}
