#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, i, j, c = 0;
  cin >> n;
  vector<long int> a;
  for (i = 0; i < n; i++) {
    cin >> j;
    a.push_back(j);
  }
  sort(a.begin(), a.end());
  for (i = 0; i <= n - 3; 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])
      c++;
    if (c == 1)
      break;
    else
      c = 0;
  }
  if (c == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
