#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, check = 0;
  const int size = 100000;
  long long seg[size];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> seg[i];
  sort(seg, seg + n);
  for (int i = 0; i < n - 2; i++) {
    if (check == 1) break;
    if (seg[i] + seg[i + 1] > seg[i + 2]) check = 1;
  }
  string ans;
  if (check == 1)
    ans = "YES";
  else
    ans = "NO";
  cout << ans << endl;
  return 0;
}
