import java.util.Scanner;


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

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


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

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
} 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();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


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

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


		if(!result){
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


		if(!result){
			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 int[] list = new int[n]; list new int[n] n for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			list[i] = sc.nextInt();
		} {
			list[i] = sc.nextInt();
		} list[i] = sc.nextInt() list[i] list i sc.nextInt() sc.nextInt sc quick_sort(list, 0, list.length-1) quick_sort list 0 list.length-1 list.length list list.length 1 boolean result = false; result false for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		} int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		} {
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		} if(list[i-1] == list[i]) {
				result = true;
				break;
			} list[i-1] == list[i] list[i-1] list i-1 i 1 list[i] list i {
				result = true;
				break;
			} result = true result true break; if(!result){
			System.out.println("YES");
		} else {
			System.out.println("NO");
		} !result result {
			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 static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    } quick_sort {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    } if (left>=right) {
            return;
        } left>=right left right {
            return;
        } return; int p = d[(left+right)/2]; p d[(left+right)/2] d (left+right)/2 (left+right) left right 2 int l = left l left r = right r right tmp; tmp while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        } l<=r l r {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        } while(d[l] < p) { l++; } d[l] < p d[l] d l p { l++; } l++ l while(d[r] > p) { r--; } d[r] > p d[r] d r p { r--; } r-- r if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            } l<=r l r {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            } tmp = d[l] tmp d[l] d l d[l] = d[r] d[l] d l d[r] d r d[r] = tmp d[r] d r tmp l++ l r-- r quick_sort(d, left, r) quick_sort d left r quick_sort(d, l, right) quick_sort d l right int[] d d int left left int right right public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


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

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
} public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


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

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
} Main
import java.util.Scanner;


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

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] list = new int[n];
		for (int i = 0; i < n; i++){
			list[i] = sc.nextInt();
		}

		quick_sort(list, 0, list.length-1);

		boolean result = false;
		for(int i = 1; i < n; i++){
			if(list[i-1] == list[i]) {
				result = true;
				break;
			}
		}


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

	static void quick_sort(int[] d, int left, int right) {
        if (left>=right) {
            return;
        }
        int p = d[(left+right)/2];
        int l = left, r = right, tmp;
        while(l<=r) {
            while(d[l] < p) { l++; }
            while(d[r] > p) { r--; }
            if (l<=r) {
                tmp = d[l]; d[l] = d[r]; d[r] = tmp;
                l++; r--;
            }
        }
        quick_sort(d, left, r);  // ピボットより左側をクイックソート
        quick_sort(d, l, right); // ピボットより右側をクイックソート
    }
}
