#include <bits/stdc++.h>
using namespace std;
void pre() {}
int arr[100010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  pre();
  int tests = 1;
  while (tests--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> arr[i];
    sort(arr, arr + n);
    for (int i = 0; i <= n - 3; i++) {
      if (arr[i] + arr[i + 1] > arr[i + 2]) {
        cout << "YES\n";
        return 0;
      }
    }
    cout << "NO\n";
  }
  return 0;
}
