#include <bits/stdc++.h>
using namespace std;
long long n;
long long arr[100010];
bool tri(long long a, long long b, long long c) {
  if (b + c >= a) return true;
  return false;
}
int32_t main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  for (long long i = 1; i < n - 1; i++) {
    if (arr[i] + arr[i - 1] > arr[i + 1]) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
