import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Collections; Collections java.util import java.util.TreeSet; TreeSet java.util public class Main {
	public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	}

} Main public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	} main {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	} TreeSet<String> input = new TreeSet<String>(); input new TreeSet<String>() BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br Collections.addAll(input, br.readLine().split(" ")) Collections.addAll Collections input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " System.out.println(input.size() != num ? "NO" : "YES") System.out.println System.out System System.out input.size() != num ? "NO" : "YES" input.size() != num input.size() input.size input num "NO" "YES" String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) throws IOException {
		TreeSet<String> input = new TreeSet<String>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		Collections.addAll(input, br.readLine().split(" "));
		System.out.println(input.size() != num ? "NO" : "YES");
	}

}
