#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i, j, k, a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int count = 0;
  for (i = 0; i < n - 2; 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])) {
      cout << "YES" << endl;
      count = 1;
      break;
    }
  }
  if (count == 0) cout << "NO" << endl;
  return 0;
}
