/* include c++ libraries */
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <map>
#include <queue>
#include <set>
#include <bitset>
#include <tuple>

/* include c-lang libraries */
#include <climits>
#include <cmath>
#include <cassert>

/* include my libraries */
//#include <show_vec.hh>

using namespace std;

#define LINE DEBUG{ printf("LINE : %d\n", __LINE__); }
#define DEBUG if(false)

using ll = long long;
template<class T> using vec = vector<T>;

template<class T>void sort(vector<T> &v){
  sort(v.begin(), v.end());
  return;
}
template<class T>void rsort(vector<T> &v){
  sort(v.begin(), v.end(), std::greater<T>());
  return;
}


const int MOD = 1000000007;

int main(int argc, char* argv[]){
  int N;
  cin >> N;
  vec<bool> A(N, false);
  for(int i = 0; i < N; i++){
    int tmp;
    cin >> tmp;
    A[tmp-1] = true;
  }
  string Ans = "Yes";
  for(int i = 0; i < N; i++){
    if(A[i] == false){
      Ans = "No";
      break;
    }
  }
  cout << Ans << endl;
  return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#include <bitset>
//#include <atcoder/all>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) ((int)(x).size())
#define pb push_back
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}

int main(){
  int N; cin >> N;
  vector<int> A(N); rep(i,N) cin >> A[i];
  vector<int> B(N);
  rep(i,N) B[i]=i+1;
  sort(all(A));
  sort(all(B));
  if(A==B){
    cout << "Yes" << endl;
  }
  else cout << "No" << endl;
  return 0;
}
