#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  x = 0;
  char ch;
  bool flag = false;
  while (ch = getchar(), ch < '!')
    ;
  if (ch == '-') ch = getchar(), flag = true;
  while (x = 10 * x + ch - '0', ch = getchar(), ch > '!')
    ;
  if (flag) x = -x;
}
const int maxn = 100010;
int a[maxn];
int main() {
  int n;
  read(n);
  for (int i = 1; i <= n; ++i) read(a[i]);
  sort(a + 1, a + n + 1);
  bool flag = false;
  for (int i = 3; i <= n; ++i) {
    if (a[i - 2] + a[i - 1] > a[i]) {
      flag = true;
      break;
    }
  }
  puts(flag ? "YES" : "NO");
  getchar();
  getchar();
  return 0;
}
