#include <bits/stdc++.h>
using namespace std;
long long const N = 2e5 + 5, mod = 1e9 + 7, inf = 1e17;
long long a[N], b[N], dp[N];
bool good(long long i) {
  if (a[i] + a[i + 1] > a[i + 2] && a[i] + a[i + 2] > a[i + 1] &&
      a[i + 1] + a[i + 2] > a[i])
    return true;
  else
    return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long sum = 0;
  long long n;
  cin >> n;
  bool h = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i <= n - 3; i++) {
    h |= good(i);
  }
  cout << (h ? "YES" : "NO");
}
