#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int> > pq;
int n;
int arr[1000006];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  for (int i = 1; i < n - 1; i++) {
    if (arr[i - 1] + arr[i] > arr[i + 1]) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
