#include <bits/stdc++.h>
using namespace std;
long arrV[100005];
int hooo;
int main() {
  scanf("%d", &hooo);
  for (int i = 0; i < hooo; i++) {
    cin >> arrV[i];
  }
  sort(arrV, arrV + hooo);
  for (int i = hooo - 1; i >= 2; i--) {
    if (arrV[i] < arrV[i - 1] + arrV[i - 2]) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  return 0;
}
