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