#include <bits/stdc++.h>
const int maxn = 100000 + 5;
using namespace std;
int main() {
  int n, a[maxn];
  cin >> n;
  bool flag = false;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 2; i < n; i++) {
    int x = a[i], y = a[i - 1];
    int z = a[i - 2];
    if ((y + z) > x && (x - y) < z) flag = true;
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
