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


int main()
{
    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);


    int n;

    cin >> n;

    set <int> s;

    for(int i=0; i<n; i++)
    {
        int temp;

        cin >> temp;

        s.insert(temp);
    }

    if(s.size() == n)
    {
        cout << "YES";
    }

    else
    {
        cout << "NO";
    }
}








#include<iostream>
using namespace std;

int main(){

	int n, num[10000];
	int max = -1000000, min = 1000000;
	long long sum = 0;

	cin >> n;

	for(int i = 0; i < n; i++){
		cin >> num[i];

		if(min > num[i]) min = num[i];
		if(max < num[i]) max = num[i];
		sum = sum + num[i];
	}

	cout << min << " " << max << " " << sum << endl;

	return 0;
}
