#include<bits/stdc++.h>
using namespace std;
int f[1100];
int main()
{
	memset(f,0,sizeof(f));
	int k;cin>>k;int sum;bool flag=0;
	for(int i=1;i<=k;i++)
	{
		cin>>sum;
		if(sum<1||sum>k) {flag=1;continue;}
		if(f[sum]==0) f[sum]++;
		else flag=1;
	}
	if(flag==1) cout<<"No";
	else cout<<"Yes";
	return 0;
}
#include<bits/stdc++.h>
#define ll long long
#define x first
#define y second
#define pi pair
#define K 1000000007
using namespace std;

ll a[2000000];
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	ll test_case=1;//cin>>test_case;
	while(test_case--)
	{
        string n;cin>>n;
        ll i=0,j=n.size()-1;
        while(i<j)swap(n[i++],n[j--]);
        string s;
         i=0;
        while(i<n.size()&&n[i]=='0')i++;
        while(i<n.size())s.push_back(n[i++]);
        ll flg=0,nt=s.size();
        for(ll i=0;i<s.size();i++)
        if(s[i]!=s[nt-1-i]){flg=1; break;}

        if(flg==0)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
	}
	return 0;
}
