n=int(input())
a=[int(i) for i in input().split()]
a.sort()
ch=0
for i in range(1,n):
    if a[i]==a[i-1]:
        ch=1
if ch==1:
    print("NO")
else:
    print("YES")
 n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a=[int(i) for i in input().split()] a [int(i) for i in input().split()] a.sort() a.sort a sort ch=0 ch 0 for i in range(1,n):
    if a[i]==a[i-1]:
        ch=1 i range(1,n) range 1 n if a[i]==a[i-1]:
        ch=1 a[i]==a[i-1] a[i] a i a[i-1] a i-1 i 1 ch=1 ch 1 if ch==1:
    print("NO")
else:
    print("YES") ch==1 ch 1 print("NO") print "NO" print("YES") print "YES" n=int(input()) int(input()) n ch=0 0 ch ch=1 1 ch a=[int(i) for i in input().split()] [int(i) for i in input().split()] a
n=int(input())
a=[int(i) for i in input().split()]
a.sort()
ch=0
for i in range(1,n):
    if a[i]==a[i-1]:
        ch=1
if ch==1:
    print("NO")
else:
    print("YES")

