#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans = 0, m = 0;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  long long a = arr[n - 1], b = arr[n - 2];
  for (int i = 0; i < (n - 2); i++) {
    if (arr[i] + arr[i + 1] > arr[i + 2]) {
      m = 1;
      break;
    }
  }
  if (m == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
