from collections import Counter



n = int(eval(input()))

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

re = 0



c = Counter(a)

new = list(c.values())



for i in new:

    if i > 1:

        re += 1



if re > 0:

    print("NO")

else:

    print("YES")

n = int(eval(input()))

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

re = 0



from collections import Counter



c = Counter(a)



for i, v in list(c.items()):

    if v >= 2:

        re += 1



if re >= 1:

    print("NO")

else:

    print("YES")

from collections import Counter

n = int(eval(input()))
a = list(map(int, input().split()))
re = 0
c = Counter(a)
new = list(c.values())
for i in new:
    if i > 1:
        re += 1
if re > 0:
    print("NO")
else:
    print("YES")

n = int(eval(input()))
a = list(map(int, input().split()))
re = 0
from collections import Counter

c = Counter(a)
for i, v in list(c.items()):
    if v >= 2:
        re += 1
if re >= 1:
    print("NO")
else:
    print("YES")

-from collections import Counter - +from collections import Counter + -new = list(c.values()) -for i in new: -    if i > 1: +for i, v in list(c.items()): +    if v >= 2: -if re > 0: +if re >= 1: