#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int a;
  cin >> a;
  vector<int> b(a);
  for (int i = 0; i < a; i++) cin >> b[i];
  sort(b.begin(), b.end());
  for (int i = a - 1; i >= 0; i--) {
    if (i - 2 < 0) break;
    if (b[i] + b[i - 1] > b[i - 2] && b[i] + b[i - 2] > b[i - 1] &&
        b[i - 2] + b[i - 1] > b[i]) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
