#include <bits/stdc++.h>
using namespace std;
long long a[100004];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 3; i <= n; i++) {
    if (a[i] < a[i - 1] + a[i - 2]) {
      cout << "YES" << '\n';
      return 0;
    }
  }
  cout << "NO" << '\n';
}
