#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1;
const int LOG = 20;
const int cntsz = 101;
const int INF = 1e9;
const int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < int(n); i++) cin >> a[i];
  sort(a.begin(), a.end());
  for (int i = int(1); i < int(n - 1); i++) {
    if (a[i - 1] + a[i] > a[i + 1]) {
      cout << "YES\n";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
