#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  int temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    a.push_back(temp);
  }
  sort(a.begin(), a.end());
  int x = 0, y = 1, z = 2;
  bool ans = false;
  while (z < n) {
    if (a[x++] + a[y++] > a[z++]) {
      ans = true;
      break;
    }
  }
  if (ans)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
