import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;

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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"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.Arrays; Arrays 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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"YES":"NO");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"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 " " int[] a = new int[n]; a new int[n] n boolean flg = true; flg true for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      a[i] = Integer.parseInt(str[i]);
    } {
      a[i] = Integer.parseInt(str[i]);
    } a[i] = Integer.parseInt(str[i]) a[i] a i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i Arrays.sort(a) Arrays.sort Arrays a for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
      if(a[i] == a[i+1])
        flg = false;
    } {
      if(a[i] == a[i+1])
        flg = false;
    } if(a[i] == a[i+1])
        flg = false; a[i] == a[i+1] a[i] a i a[i+1] a i+1 i 1 flg = false flg false System.out.println(flg==true?"YES":"NO") System.out.println System.out System System.out flg==true?"YES":"NO" flg==true flg true "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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"YES":"NO");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;

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(" ");
    int[] a = new int[n];
    boolean flg = true;
    for(int i=0; i<n; i++) {
      a[i] = Integer.parseInt(str[i]);
    }
    Arrays.sort(a);
    for(int i=0; i<n-1; i++) {
      if(a[i] == a[i+1])
        flg = false;
    }
    System.out.println(flg==true?"YES":"NO");
  }
}