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