import java.util.*;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    }
} Main public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(); set new HashSet<>() for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        } {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	} set.contains(num) set.contains set num {
        		System.out.println("NO");
        		return;
        	} System.out.println("NO") System.out.println System.out System System.out "NO" return; set.add(num) set.add set num System.out.println("YES") System.out.println System.out System System.out "YES" String args[] args public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    }
} public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < n; i++) {
        	int num = sc.nextInt();
        	if(set.contains(num)) {
        		System.out.println("NO");
        		return;
        	}
        	set.add(num);
        }

        System.out.println("YES");
    }
}
