import java.util.HashSet;
import java.util.Scanner;

public class Main {
  	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
  	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	}
} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc boolean ans = true; ans true HashSet<Integer> hs = new HashSet<>(); hs new HashSet<>() for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		} {
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		} int ai = sc.nextInt(); ai sc.nextInt() sc.nextInt sc if(hs.contains(ai)){
				ans = false;
				break;
			} hs.contains(ai) hs.contains hs ai {
				ans = false;
				break;
			} ans = false ans false break; hs.add(ai) hs.add hs ai if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		} ans {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
  	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	}
} public class Main {
  	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	}
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main {
  	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		boolean ans = true;

		HashSet<Integer> hs = new HashSet<>();

		for(int i=0;i<N;i++){
			int ai = sc.nextInt();

			if(hs.contains(ai)){
				ans = false;
				break;
			}

			hs.add(ai);
		}

		if(ans){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}


	}
}