import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  }
} Main public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " Set<Integer> st = new HashSet<>(); st new HashSet<>() for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      st.add(Integer.parseInt(str[i]));
    } {
      st.add(Integer.parseInt(str[i]));
    } st.add(Integer.parseInt(str[i])) st.add st Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i System.out.println(st.size() == n?"YES":"NO") System.out.println System.out System System.out st.size() == n?"YES":"NO" st.size() == n st.size() st.size st n "YES" "NO" String[] args args public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  }
} public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

public class Main {
  public static void main(String[] args)throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    Set<Integer> st = new HashSet<>();
    for(int i=0; i<n; i++) {
      st.add(Integer.parseInt(str[i]));
    }
    System.out.println(st.size() == n?"YES":"NO");
  }
}