N=int(eval(input()))

A=list(map(int, input().split()))

A.sort()

ans="YES"

for i in range(N-1):

    if A[i]==A[i+1]:

        ans="NO"

        break

print(ans)
from collections import defaultdict



N = int(eval(input()))

A = list(map(int, input().split()))



d = defaultdict(int)

for a in A:

    d[a] += 1



if len(d) == N:

    print("YES")

else:

    print("NO")
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()
ans = "YES"
for i in range(N - 1):
    if A[i] == A[i + 1]:
        ans = "NO"
        break
print(ans)

from collections import defaultdict

N = int(eval(input()))
A = list(map(int, input().split()))
d = defaultdict(int)
for a in A:
    d[a] += 1
if len(d) == N:
    print("YES")
else:
    print("NO")

+from collections import defaultdict + -A.sort() -ans = "YES" -for i in range(N - 1): -    if A[i] == A[i + 1]: -        ans = "NO" -        break -print(ans) +d = defaultdict(int) +for a in A: +    d[a] += 1 +if len(d) == N: +    print("YES") +else: +    print("NO")