#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define nl "\n"
#define sp " "

void solve()
{
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    int arr1[n]={0};
    for(int i=0;i<n;i++)
    {
        arr1[arr[i]-1]++;
    }
    for(int i=0;i<n;i++)
    {
        if(arr1[i]!=1)
        {
            cout<<"No"<<nl;
            return;
        }
    }
    cout<<"Yes"<<nl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll t;
    t = 1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using db = long double;
using vi = vector<int>;
using vl = vector<ll>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;

template<typename T> using pqg = priority_queue<T, vector<T>, greater<T> >;

#define FOR(i, a, n) for(int i=(a); i<(n); ++i)
#define ROF(i, a, n) for(int i=(n)-1; i>=(a); --i)

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) int((x).size())
#define ins insert
#define pb push_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define endl '\n'

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<typename T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

#define ts to_string
string ts(char c) { return string(1, c); }
string ts(const char* s) { return (string)s; }
string ts(const string& s) { return '"' + s + '"'; }
string ts(bool b) { return (b ? "true" : "false"); }

string ts(vector<bool> v) {
    string res = "{";
    FOR(i, 0, sz(v))
        res += char('0' + v[i]);
    res += "}";
    return res;
}

template <size_t SZ> string ts(bitset<SZ> b) {
    string res;
    FOR(i, 0, SZ)
        res += char('0' + b[i]);
    return res;
}

template <typename A, typename B> string ts(pair<A, B> p);
template <typename A> string ts(A v) {
    bool first = 1; string res = "{";
    for (const auto& x: v) {
        if (!first) res += ", ";
        first = 0; res += ts(x);
    }
    res += "}"; return res;
}

template <typename A, typename B> string ts(pair<A, B> p) {
    return "(" + ts(p.fi) + ", " + ts(p.se) + ")";
}

void dbgOut() { cerr << "]" << endl; }
template <typename H, typename... T> void dbgOut(H h, T... t) {
    cerr << ts(h); if (sizeof...(t)) cerr << ", ";
    dbgOut(t...);
}

#ifdef LOCAL
    #define dbg(...) cerr << "Line(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", dbgOut(__VA_ARGS__)
#else
    #define dbg(...) 0
#endif

const int MOD = 1e9+7; // 998244353;
const ll INF = 1e18;
const int MX = 2e5+5;

void solve() {
    int n; cin >> n;
    vi a(n);
    FOR(i, 0, n) cin >> a[i];

    sort(all(a));
    FOR(i, 0, n) {
        if (a[i] != i + 1) {
            cout << "No" << endl;
            return;
        }
    }
    cout << "Yes" << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

#ifdef LOCAL
    auto begin = std::chrono::high_resolution_clock::now();
#endif

    solve();

#ifdef LOCAL
    auto end = std::chrono::high_resolution_clock::now();
    cerr << "\nExecution time: " << std::chrono::duration_cast<std::chrono::duration<double>> (end-begin).count() << " seconds\n";
#endif
}
