import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    }

    // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    }
}  import java.util.Arrays; Arrays java.util import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    }

    // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} Main public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    } areDistinct {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    } Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr)); s new HashSet<Integer>(Arrays.asList(arr)) return (s.size() == arr.length); (s.size() == arr.length) s.size() s.size s arr.length arr arr.length Integer arr[] arr // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    } main {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc Integer[] arr = new Integer[x]; arr new Integer[x] x int i = 0; i 0 while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        } i < arr.length i arr.length arr arr.length {
           arr[i]  = sc.nextInt();
           i++;
        } arr[i]  = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc i++ i if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO"); areDistinct(arr) areDistinct arr System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
    public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    }

    // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} public class Main {
    public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    }

    // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} Main
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static boolean areDistinct(Integer arr[])
    {
        // Put all array elements in a HashSet 
        Set<Integer> s =
                new HashSet<Integer>(Arrays.asList(arr));

        // If all elements are distinct, size of 
        // HashSet should be same array. 
        return (s.size() == arr.length);
    }

    // Driver code 
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        Integer[] arr = new Integer[x];
        int i = 0;
        while (i < arr.length) {
           arr[i]  = sc.nextInt();
           i++;
        }

        if (areDistinct(arr))
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} 