#include <bits/stdc++.h>
using namespace std;
bool equ(const int &a, const int &b) { return a == b && a == 1; }
int main() {
  vector<int> v;
  copy_n(istream_iterator<int>(cin), *istream_iterator<int>(cin),
         back_inserter(v));
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  adjacent_difference(v.begin(), v.end(), v.begin());
  *ostream_iterator<string>(cout, "") =
      adjacent_find(v.begin() + 1, v.end(), equ) == v.end() ? "NO" : "YES";
}
