s=int(input())
# b=input()
# c=[]
# for i in range(b):
#     c.append(a[i])
a = list(map(int,input().split()))
#b = list(map(int,input().split()))

c = {i for i in a}  

if len(a)==len(c):
    print("YES")
else:
    print("NO")  s=int(input()) s int(input()) int input() input a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split i for i in a for i in a i a for i in a i c = {i for i in a} c if len(a)==len(c):
    print("YES")
else:
    print("NO")  len(a)==len(c) len(a) len a len(c) len c print("YES") print "YES" print("NO") print "NO" a = list(map(int,input().split())) list(map(int,input().split())) a c = {i for i in a} c s=int(input()) int(input()) s
s=int(input())
# b=input()
# c=[]
# for i in range(b):
#     c.append(a[i])
a = list(map(int,input().split()))
#b = list(map(int,input().split()))

c = {i for i in a}  

if len(a)==len(c):
    print("YES")
else:
    print("NO") 