#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, a[100009], x, y, z, n;
  while (cin >> n) {
    for (i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    for (i = 0; i < n - 2; i++) {
      if (a[i + 2] < a[i] + a[i + 1]) {
        cout << "YES" << endl;
        break;
      }
    }
    if (i == n - 2) {
      cout << "NO" << endl;
    }
  }
}
