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