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