import sys

input = sys.stdin.readline

N = int(eval(input()))

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

s = set()

for x in a:

  if x in s:

    print("NO")

    exit(0)

  s.add(x)

print("YES")
import sys

input = sys.stdin.readline

N = int(eval(input()))

a = set(map(int, input().split()))

if N == len(a): print("YES")

else: print("NO")
import sys

input = sys.stdin.readline
N = int(eval(input()))
a = list(map(int, input().split()))
s = set()
for x in a:
    if x in s:
        print("NO")
        exit(0)
    s.add(x)
print("YES")

import sys

input = sys.stdin.readline
N = int(eval(input()))
a = set(map(int, input().split()))
if N == len(a):
    print("YES")
else:
    print("NO")

-a = list(map(int, input().split())) -s = set() -for x in a: -    if x in s: -        print("NO") -        exit(0) -    s.add(x) -print("YES") +a = set(map(int, input().split())) +if N == len(a): +    print("YES") +else: +    print("NO")