#include <bits/stdc++.h>
using namespace std;
void gett() { cerr << (clock()) / (double)CLOCKS_PER_SEC << "\n"; }
long long powr(long long a, long long b, long long mod) {
  long long x = 1 % mod;
  a %= mod;
  while (b) {
    if (b & 1) x = (x * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return x;
}
long long inv(long long a, long long mod) { return powr(a, mod - 2, mod); }
const int maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
int dp[maxn], H[maxn], l[maxn], r[maxn], m[maxn];
const long long inf = 1e9 + 7;
int main() {
  int n, x;
  scanf("%d", &(n));
  set<int> s;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n)); i += 1) {
    scanf("%d", &(x)), s.insert(x);
  }
  for (int i : s) {
    if (s.find(i + 1) != s.end() && s.find(i + 2) != s.end()) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
