import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	}


} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	}


} Main public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in int N = Integer.parseInt(W); N Integer.parseInt(W) Integer.parseInt Integer W W = in.readLine() W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " int[] A = new int[N]; A new int[N] N for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			A[i] = Integer.parseInt(Ws[i]);
		} {
			A[i] = Integer.parseInt(Ws[i]);
		} A[i] = Integer.parseInt(Ws[i]) A[i] A i Integer.parseInt(Ws[i]) Integer.parseInt Integer Ws[i] Ws i Arrays.sort(A) Arrays.sort Arrays A String ans = "YES"; ans "YES" for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		} {
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		} if(A[i-1]==A[i]){
				ans = "NO";
				break;
			} A[i-1]==A[i] A[i-1] A i-1 i 1 A[i] A i {
				ans = "NO";
				break;
			} ans = "NO" ans "NO" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	}


} public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	}


} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int N = Integer.parseInt(W);

		W = in.readLine();
		String[] Ws = W.split(" ");

		int[] A = new int[N];
		for(int i=0;i<N;i++){
			A[i] = Integer.parseInt(Ws[i]);
		}
		Arrays.sort(A);

		String ans = "YES";
		for(int i=1;i<N;i++){
			if(A[i-1]==A[i]){
				ans = "NO";
				break;
			}
		}

		System.out.println(ans);

	}


}
