#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, z, c, d, e;
  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] && a[i + 2] + a[i + 1] > a[i] &&
        a[i] + a[i + 2] > a[i + 1]) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
