/**
      11  11   000000   111111
      11 11       00    111111
      1111       00       11
      11 11     00        11
      11  11   000000     11     **/

#include<bits/stdc++.h>

using namespace std;

#define fto(i, a, b) for(int i = a; i <= b; ++i)
#define fdto(i, a, b) for(int i = a; i >= b; --i)
#define bugarr(a, i, j) cout << #a << "{" << i << "..." << j << "}:"; fto(k, i, j-1) cout << a[k] << ", "; cout << a[j] << endl;
#define ll long long
#define db double
#define ldb long double
#define ii pair<int, int>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vii vector<ii>
#define vll vector<ll>
#define vvi vector<vi>
#define vdb vector<db>
#define vldb vector<ldb>
#define all(x) (x).begin(), (x).end()
#define sz(a) (int)a.size()
#define fast ios::sync_with_stdio(false); cin.tie(0)

bool ckmin(int &a, int b) {return (b < a)? a = b, true : false;}
bool ckmax(int &a, int b) {return (b > a)? a = b, true : false;}

int main() {
    //freopen("b.inp", "r", stdin);
    //freopen("b.out", "w", stdout);

    fast;
    int n;
    cin >> n;
    vi dd(100000);
    fto(i, 1, n) {
        int x;
        cin >> x;
        ++dd[x];
    } 
    fto(i, 1, n) {
        if (dd[i] == 0 || dd[i] > 1) {
            cout << "No\n";
            return 0;
        }
    }

    cout << "Yes\n";

    return 0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define int long long int
#define pb push_back
#define pi pair<int, int>
#define pii pair<int, pi>
#define fir first
#define sec second
#define MAXN 100001
#define mod 1000000007

signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  set<int> s;
  for (int i = 0; i < n; i++)
  {
    int k;
    cin >> k;
    s.insert(k);
  }
  bool can = true;
  if (s.size() != n)
    can = false;
  int curr = 1;
  for (auto const &i : s)
  {
    if (i != curr)
      can = false;
    curr++;
  }
  (can) ? cout << "Yes\n" : cout << "No\n";
  return 0;
}