#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long INF = INT_MAX;
const long long _INF = INT_MIN;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int arr[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;
}
