#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < (n); i++) cin >> arr[i];
  sort(arr, arr + n);
  bool flag = false;
  for (int i = 0; i < (n - 2); i++) {
    if ((arr[i] + arr[i + 1] > arr[i + 2]) &&
        (arr[i + 2] + arr[i + 1] > arr[i]) &&
        (arr[i] + arr[i + 2] > arr[i + 1])) {
      flag = true;
      break;
    }
  }
  if (flag)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) solve();
  return 0;
}
