#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  bool ans=true;
  cin>>N;
  vector<int> a(N);
  for(int i=0;i<N;i++)  cin>>a.at(i);
  sort(a.begin(),a.end());
  for(int i=1;i<=N;i++) if(a[i-1]!=i) ans=false;
  if(ans)   cout<<"Yes"<<endl;
  else      cout<<"No"<<endl;
}
#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define pb push_back
#define ll long long
#define mk make_pair
#define endl '\n'
#define M  1000000007
ull dp[101][101];
ull nCr(ull n,ull r)
{
    if(n==r)return dp[n][r]=1;
    if(r==1)return dp[n][r]=n;
    if(r==0)return dp[n][r]=1;
    if(dp[n][r])return dp[n][r];
    return dp[n][r]=nCr(n-1,r-1)+nCr(n-1,r);
}

ll mod(ll x)
{
    return ((x%M+M)%M);    // x will be negative or positive
}
ll add(ll a,ll b)
{
    return mod((mod(a)+mod(b)));
}
ll mul(ll a,ll b)
{
    return mod(mod(a)*mod(b));
}
bool cmp(const pair<ll,ll>&p1, pair<ll,ll>&p2)
{
    if(p1.first>p2.first)return 1;
    else if(p1.first==p2.first)return (p1.second<p2.second);
    else return 0;
}
bool is_balanced(char first,char second )
{
    return ((first=='('&& second==')')||(first=='{' && second=='}') || (first=='[' && second==']'));
}
int main()
{
    ll test=1;
    //cin>>test;
    while(test--)
    {
       ll n;
       cin>>n;
       ll a[n];
       set<ll>s;
       for(ll i=0;i<n;i++)
       {
           cin>>a[i];
           s.insert(a[i]);
       }
       if(s.size()==n)cout<<"Yes"<<endl;
       else cout<<"No"<<endl;
    }

}
//Alhamdulillah...
