#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 505;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double eps = 1e-6;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &i : a) cin >> i;
  sort(a.begin(), a.end());
  for (int i = 1; i <= n - 2; ++i) {
    if (a[i - 1] + a[i] > a[i + 1]) {
      cout << "YES" << '\n';
      return;
    }
  }
  cout << "NO" << '\n';
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
