#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100005];
  bool t = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n - 2; i++) {
    if (a[i] + a[i + 1] > a[i + 2] && a[i + 1] + a[i + 2] > a[i] &&
        a[i] + a[i + 2] > a[i + 1]) {
      t = 1;
      break;
    }
  }
  if (t)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
