#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int MAX = 10000007;
inline long long read() {
  char c = getchar();
  long long x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0', c = getchar();
  }
  return x * f;
}
inline void out(long long x) {
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
const int mod = 1e9 + 7;
long long q[N];
map<long long, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = (1); i <= (n); ++i) {
    cin >> q[i];
  }
  sort(q + 1, q + 1 + n);
  for (int i = (3); i <= (n); ++i) {
    if (q[i] < q[i - 1] + q[i - 2]) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
