#include <bits/stdc++.h>
using namespace std;
int n, v[100002], nr;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  sort(v + 1, v + n + 1);
  for (int i = 1; i <= n - 2; i++) {
    if (v[i] + v[i + 1] > v[i + 2]) nr++;
  }
  if (nr == 0)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
