#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
#define ll long long
#define for1(i,n,a,b) for(ll (i)=(n);(i)<=(a);(i)+=(b))
#define for2(i,n,a,b) for(ll (i)=(n);(i)>=(a);(i)-=(b))
ll a[1005];
int main()
{
	ll n;
	cin>>n;
	for1(i,1,n,1)
	{
		cin>>a[i];
	}
	sort(a+1,a+n+1);
	for1(i,2,n,1)
	{
		if(a[i]-a[i-1]!=1)
		{
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define tr(it, a) for (auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
// mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
// int rng(int lim)
// {
//     uniform_int_distribution<int> uid(0, lim - 1);
//     return uid(rang);
// }
const int mod = 1'000'000'007;
//=======================================================================
int isPalindrome(string str)
{
    // Start from leftmost and rightmost corners of str
    int l = 0;
    int h = str.size() - 1;

    // Keep comparing characters while they are same
    while (h > l)
    {
        if (str[l++] != str[h--])
        {
            //printf("%s is Not Palindrome", str);
            return 0;
        }
    }
    return 1;
}
int mpow(int base, int exp)
{
    base %= mod;
    int result = 1;
    while (exp > 0)
    {
        if (exp & 1)
            result = ((ll)result * base) % mod;
        base = ((ll)base * base) % mod;
        exp >>= 1;
    }
    return result;
}
int getSum(int n)
{
    int sum = 0;
    while (n != 0)
    {
        sum = sum + n % 10;
        n = n / 10;
    }
    return sum;
}
bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}
int countDigit(int n)
{
    if (n == 0)
        return 0;
    return 1 + countDigit(n / 10);
}
ll factorial(ll n)
{
    ll res = 1, i;
    for (i = 2; i <= n; i++)
        res *= ((i * 1LL) % mod);
    return res;
}

//----------------------------------------------------------------------------
int main()
{
    // ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    // srand(chrono::high_resolution_clock::now().time_since_epoch().count());

    ll i, j, n, a[100000], count = 0, sum = 0;

    unordered_set<int> s;
    cin >> n;
    for (i = 0; i < n; i++)
    {
        cin >> j;
        s.insert(j);
    }
    if (s.size() == n)
    {
        cout << "Yes";
    }
    else
    {
        cout << "No";
    }

    return 0;
}
