import java.util.Scanner;

class Main {
    static void quickSort(int[] a, int left, int right) {
        int pl = left;
        int pr = right;
        int x = a[(pl + pr) / 2];

        do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr);

        if (left < pr)  quickSort(a, left, pr);
        if (pl < right) quickSort(a, pl, right);
    }

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = Integer.parseInt(stdIn.next());
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        }

        quickSort(a, 0, n - 1);

        int i;
        for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        }

        if (i == n - 1) {
            System.out.println("YES");
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    static void quickSort(int[] a, int left, int right) {
        int pl = left;
        int pr = right;
        int x = a[(pl + pr) / 2];

        do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr);

        if (left < pr)  quickSort(a, left, pr);
        if (pl < right) quickSort(a, pl, right);
    }

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = Integer.parseInt(stdIn.next());
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        }

        quickSort(a, 0, n - 1);

        int i;
        for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        }

        if (i == n - 1) {
            System.out.println("YES");
        }
    }
} Main static void quickSort(int[] a, int left, int right) {
        int pl = left;
        int pr = right;
        int x = a[(pl + pr) / 2];

        do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr);

        if (left < pr)  quickSort(a, left, pr);
        if (pl < right) quickSort(a, pl, right);
    } quickSort {
        int pl = left;
        int pr = right;
        int x = a[(pl + pr) / 2];

        do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr);

        if (left < pr)  quickSort(a, left, pr);
        if (pl < right) quickSort(a, pl, right);
    } int pl = left; pl left int pr = right; pr right int x = a[(pl + pr) / 2]; x a[(pl + pr) / 2] a (pl + pr) / 2 (pl + pr) pl pr 2 do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr); pl <= pr pl pr {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (a[pl] < x) pl++; a[pl] < x a[pl] a pl x pl++ pl while (a[pr] > x) pr--; a[pr] > x a[pr] a pr x pr-- pr if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            } pl <= pr pl pr {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            } int t = a[pl]; t a[pl] a pl a[pl] = a[pr] a[pl] a pl a[pr] a pr a[pr] = t a[pr] a pr t pl++ pl pr-- pr if (left < pr)  quickSort(a, left, pr); left < pr left pr quickSort(a, left, pr) quickSort a left pr if (pl < right) quickSort(a, pl, right); pl < right pl right quickSort(a, pl, right) quickSort a pl right int[] a a int left left int right right public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = Integer.parseInt(stdIn.next());
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        }

        quickSort(a, 0, n - 1);

        int i;
        for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        }

        if (i == n - 1) {
            System.out.println("YES");
        }
    } main {
        Scanner stdIn = new Scanner(System.in);
        int n = Integer.parseInt(stdIn.next());
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        }

        quickSort(a, 0, n - 1);

        int i;
        for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        }

        if (i == n - 1) {
            System.out.println("YES");
        }
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = Integer.parseInt(stdIn.next()); n Integer.parseInt(stdIn.next()) Integer.parseInt Integer stdIn.next() stdIn.next stdIn int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a[i] = Integer.parseInt(stdIn.next());
        } {
            a[i] = Integer.parseInt(stdIn.next());
        } a[i] = Integer.parseInt(stdIn.next()) a[i] a i Integer.parseInt(stdIn.next()) Integer.parseInt Integer stdIn.next() stdIn.next stdIn quickSort(a, 0, n - 1) quickSort a 0 n - 1 n 1 int i; i for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        } i = 0; i = 0 i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        } {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        } if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            } a[i] == a[i + 1] a[i] a i a[i + 1] a i + 1 i 1 {
                System.out.println("NO");
                break;
            } System.out.println("NO") System.out.println System.out System System.out "NO" break; if (i == n - 1) {
            System.out.println("YES");
        } i == n - 1 i n - 1 n 1 {
            System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args
import java.util.Scanner;

class Main {
    static void quickSort(int[] a, int left, int right) {
        int pl = left;
        int pr = right;
        int x = a[(pl + pr) / 2];

        do {
            while (a[pl] < x) pl++;
            while (a[pr] > x) pr--;
            if (pl <= pr) {
                int t = a[pl];
                a[pl] = a[pr];
                a[pr] = t;
                pl++;
                pr--;
            }
        } while (pl <= pr);

        if (left < pr)  quickSort(a, left, pr);
        if (pl < right) quickSort(a, pl, right);
    }

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = Integer.parseInt(stdIn.next());
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(stdIn.next());
        }

        quickSort(a, 0, n - 1);

        int i;
        for (i = 0; i < n - 1; i++) {
            if (a[i] == a[i + 1]) {
                System.out.println("NO");
                break;
            }
        }

        if (i == n - 1) {
            System.out.println("YES");
        }
    }
}