#include<bits/stdc++.h>
#include <string>
#include<vector>
#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
  	int n;
  	cin>>n;
  	int a[n],i;
  	for(i=0;i<n;i++)
      cin>>a[i];
  	
  	set<int> s(a,a+n);
  	if(s.size()==n)
      cout<<"Yes";
  	else
      cout<<"No";
	return 0;
}
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include <stack>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <queue>
#include <climits>

#define MAXCHAR 255
#define ll long long

using namespace std;
const ll dividend = 1000000007;
const ll limit = pow(10, 18);
const ll bigNum = pow(10, 9);
const int intMax = 2147483647;

ll funcComb(int n, int k)
{
	ll output = 1;
	int sum = n + k;
	vector<int> dividends;
	for (int i = 0; i < k; i++)
	{
		dividends.push_back(k - i);
	}
	for (int i = 0; i < k; i++)
	{
		output *= sum - i;
		for (auto it = dividends.begin(); it != dividends.end(); it++)
		{
			if (*it == 0)
				continue;
			if (output % *it == 0)
			{
				output /= *it;
				*it = 0;
			}
		}
		if (output > dividend)
		{
			output %= dividend;
		}
	}

	return output;
}

ll funcPow(int n, int r)
{
	ll ret = 1;
	for (int i = 1; i <= r; i++)
	{
		ret *= n;
		if (ret > dividend)
			ret %= dividend;
	}
	return ret;
}

vector<int> A;
vector<int> Ns;

int main()
{
	int N;
	cin >> N;
	for (int i = 0; i < N; ++i)
	{
		int a;
		cin >> a;
		A.push_back(a);
		Ns.push_back(i + 1);
	}
	sort(A.begin(), A.end());
	if (A == Ns)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
	return 0;
}