def has_duplicates(seq):

    return len(seq) != len(set(seq))



N = int(eval(input()))

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



if has_duplicates(A):

    print("NO")

else:

    print("YES")

N = eval(input())

A = input().split()

n = len(A)

n_temp = len(set(A))



if n != n_temp:

  print("NO")

else:

  print("YES")

def has_duplicates(seq):
    return len(seq) != len(set(seq))


N = int(eval(input()))
A = list(map(int, input().split()))
if has_duplicates(A):
    print("NO")
else:
    print("YES")

N = eval(input())
A = input().split()
n = len(A)
n_temp = len(set(A))
if n != n_temp:
    print("NO")
else:
    print("YES")

-def has_duplicates(seq): -    return len(seq) != len(set(seq)) - - -N = int(eval(input())) -A = list(map(int, input().split())) -if has_duplicates(A): +N = eval(input()) +A = input().split() +n = len(A) +n_temp = len(set(A)) +if n != n_temp: