import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("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.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " br.close() br.close br List<Integer> nums = new ArrayList<Integer>(); nums new ArrayList<Integer>() for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			nums.add(Integer.parseInt(line[i]));
		} {
			nums.add(Integer.parseInt(line[i]));
		} nums.add(Integer.parseInt(line[i])) nums.add nums Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i Collections.sort(nums) Collections.sort Collections nums boolean flg = false; flg false for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		} int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		} {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		} if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			} nums.get(i).equals(nums.get(i+1)) nums.get(i).equals nums.get(i) nums.get nums i nums.get(i+1) nums.get nums i+1 i 1 {
				flg = true;
				break;
			} flg = true flg true break; if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		} flg {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" {
			System.out.println("YES");
		} 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 IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	}

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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		br.close();
		List<Integer> nums = new ArrayList<Integer>();
		for(int i=0;i<n;i++) {
			nums.add(Integer.parseInt(line[i]));
		}
		Collections.sort(nums);
		
		boolean flg = false;
		for(int i=0;i<n-1;i++) {
			if(nums.get(i).equals(nums.get(i+1))) {
				flg = true;
				break;
			}
		}
		if(flg) {
			System.out.println("NO");
		}else {
			System.out.println("YES");
		}

	}

}
