#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int N, ar[maxn], is[maxn];
int main() {
  cin >> N;
  for (int i = 1; i <= N; i++) {
    scanf("%d", &ar[i]);
    is[ar[i]] = 1;
  }
  for (int i = 1; i <= N; i++)
    if (is[ar[i] - 1] && is[ar[i] + 1]) {
      puts("YES");
      return 0;
    }
  puts("NO");
  return 0;
}
