#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int x[1007] = {0};
  vector<int> sol;
  for (int i = 0; i < n; i++) {
    cin >> x[0];
    if (!x[x[0]]) sol.push_back(x[0]);
    x[x[0]]++;
  }
  sort(sol.begin(), sol.end());
  for (int i = 2; i < sol.size(); i++)
    if (sol[i] - sol[i - 2] < 3) {
      cout << "YES";
      return 0;
    }
  cout << "NO";
  return 0;
}
