import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  }
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  } main {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc Map<Integer, Integer> used = new HashMap<>(); used new HashMap<>() for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    } {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    } int val = sc.nextInt(); val sc.nextInt() sc.nextInt sc if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      } used.get(val) != null used.get(val) used.get used val null {
        System.out.println("NO");
        return;
      } System.out.println("NO") System.out.println System.out System System.out "NO" return; {
        used.put(val, i);
      } used.put(val, i) used.put used val i System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  }
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int num = sc.nextInt();
    Map<Integer, Integer> used = new HashMap<>();
    for (int i = 0; i < num; i++) {
      int val = sc.nextInt();
      if (used.get(val) != null) {
        System.out.println("NO");
        return;
      } else {
        used.put(val, i);
      }
    }
    System.out.println("YES");
  }
}
