#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
void fibo(long long a) {
  vector<int> v;
  v.push_back(0);
  cout << v[0] << " ";
  v.push_back(1);
  cout << v[1] << " ";
  for (long long z = 2; z <= a; z++) {
    v.push_back(v[z - 2] + v[z - 1]);
    cout << v[z - 2] + v[z - 1] << " ";
  }
}
bool isprime(long long a) {
  if (a == 2 || a == 3 || a == 5 || a == 7)
    return true;
  else if (a % 2 == 0)
    return false;
  else if (a == 1)
    return false;
  else {
    for (long long i = 3; i <= sqrt(a); i += 2)
      if (a % i == 0) return false;
    return true;
  }
}
const int mod = (int)10e7 + 7;
long long maxx = 10e9;
long long cnt = 0, temp = 0, sum = 0, ans = 0, res = 0, i, j;
int main() {
  long long n;
  while (cin >> n) {
    long long a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    for (i = 2; i < n; i++)
      if (a[i - 2] + a[i - 1] > a[i]) {
        cout << "YES" << endl;
        cnt++;
        break;
      };
    if (cnt == 0) cout << "NO" << endl;
    cnt = 0;
  }
}
