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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	} main {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<Long> set = new HashSet<>(); set new HashSet<>() for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			set.add(sc.nextLong());
		} {
			set.add(sc.nextLong());
		} set.add(sc.nextLong()) set.add set sc.nextLong() sc.nextLong sc System.out.println(set.size()==N?"YES":"NO") System.out.println System.out System System.out set.size()==N?"YES":"NO" set.size()==N set.size() set.size set N "YES" "NO" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		Set<Long> set = new HashSet<>();

		for(int i=0;i<N;i++) {
			set.add(sc.nextLong());
		}
		System.out.println(set.size()==N?"YES":"NO");
	}
}
