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