#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, x, y, z, c = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (long long i = 0; i < n - 2; i++) {
    if ((a[i] + a[i + 1]) > a[i + 2]) {
      c = 1;
      break;
    }
  }
  if (c == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
