#include <bits/stdc++.h>
using namespace std;
int sides[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> sides[i];
  }
  sort(sides, sides + n);
  bool res = false;
  for (int i = 0; i < (n - 2); i++) {
    if (sides[i] + sides[i + 1] > sides[i + 2]) {
      res = true;
      break;
    }
  }
  cout << (res ? "YES" : "NO") << "\n";
  return 0;
}
