#include <bits/stdc++.h>
using namespace std;
const int n = 1e5;
int arr[n];
int main() {
  int n, v, m, x;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  bool flag = true;
  for (int i = n - 1; i >= 0; i--) {
    if (arr[i] < arr[i - 1] + arr[i - 2] && arr[i] + arr[i - 1] > arr[i - 2] &&
        arr[i] + arr[i - 2] > arr[i - 1]) {
      flag = true;
      break;
    } else {
      flag = false;
      continue;
    }
  }
  if (flag == true)
    cout << "YES";
  else
    cout << "NO";
}
