import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  }
}
       import java.util.*; util.* java public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  }
} Main public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  } main {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  } Scanner in=new Scanner(System.in); in new Scanner(System.in) HashSet<Integer> set=new HashSet<>(); set new HashSet<>() int n=in.nextInt(); n in.nextInt() in.nextInt in int arr[]=new int[n]; arr new int[n] n for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    } {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    } arr[i]=in.nextInt() arr[i] arr i in.nextInt() in.nextInt in set.add(arr[i]) set.add set arr[i] arr i if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    } set.size()==n set.size() set.size set n {
      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 public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  }
} public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  }
} Main
import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    HashSet<Integer> set=new HashSet<>();
    int n=in.nextInt();
    int arr[]=new int[n];
    for(int i=0;i<n;i++)
    {
      arr[i]=in.nextInt();
      set.add(arr[i]);
    }
    if(set.size()==n)
    {
      System.out.println("YES");
    }
    else
    {
      System.out.println("NO");
    }
  }
}
      