import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES")



if __name__=="__main__":
    main() import math math from math import gcd INF = float("inf") INF float("inf") float "inf" import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline import itertools itertools from collections import Counter def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES") main n = int(input()) n int(input()) int input() input l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split len_l = len(l) len_l len(l) len l len_set_l = len(set(l)) len_set_l len(set(l)) len set(l) set l if len_l != len_set_l:
        print("NO")
    else:
        print("YES") len_l != len_set_l len_l len_set_l print("NO") print "NO" print("YES") print "YES" if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main input=sys.stdin.readline sys.stdin.readline input INF = float("inf") float("inf") INF def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES") def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES") main
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    l = list(map(int, input().split()))
    len_l = len(l)
    len_set_l = len(set(l))
    if len_l != len_set_l:
        print("NO")
    else:
        print("YES")



if __name__=="__main__":
    main()
