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