#include <bits/stdc++.h>
using namespace std;
bool tri(int a, int b, int c) {
  if (a + b > c && a + c > b && b + c > a)
    return true;
  else
    return false;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (tri(a[0], a[1], a[2])) {
    cout << "YES";
    return 0;
  }
  for (int i = n - 1; i > 1; i--) {
    for (int u = i - 1; u > 0; u--) {
      for (int y = u - 1; y >= 0; y--) {
        if (tri(a[i], a[u], a[y])) {
          cout << "YES";
          return 0;
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
