#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 5;
const int INF = 2e9;
const ll LINF = 9e18;
int n;
ll a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  bool valid = 0;
  for (int i = 3; i <= n; i++) {
    valid |= a[i - 2] + a[i - 1] > a[i];
  }
  cout << (valid ? "YES\n" : "NO\n");
}
