#include <bits/stdc++.h>
using namespace std;
long long int n, k[100], m, i, l = 0, j, b[100], a[100009], p[100];
int main() {
  cin >> n;
  m = n;
  i = 0;
  while (n--) {
    cin >> a[i];
    i++;
  }
  sort(a, a + i);
  for (i = m - 1; i > 1; i--) {
    if (a[i - 2] + a[i - 1] > a[i]) {
      l = 1;
      break;
    }
  }
  if (l == 1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
