#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int a[N];
bool b;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  b = false;
  for (int i = 3; i <= n; i++) {
    if (a[i - 2] + a[i - 1] > a[i]) {
      b = true;
      break;
    }
  }
  if (b) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
