a=int(input())
b=input()
c=list(b.split(' '))
c.sort()
for i in range(0,len(c)-1):
    if c[i]==c[i+1]:
        print('NO')
        break
    if i==len(c)-2:
        print('YES') a=int(input()) a int(input()) int input() input b=input() b input() input c=list(b.split(' ')) c list(b.split(' ')) list b.split(' ') b.split b split ' ' c.sort() c.sort c sort for i in range(0,len(c)-1):
    if c[i]==c[i+1]:
        print('NO')
        break
    if i==len(c)-2:
        print('YES') i range(0,len(c)-1) range 0 len(c)-1 len(c) len c 1 if c[i]==c[i+1]:
        print('NO')
        break
     c[i]==c[i+1] c[i] c i c[i+1] c i+1 i 1 print('NO') print 'NO' break if i==len(c)-2:
        print('YES') i==len(c)-2 i len(c)-2 len(c) len c 2 print('YES') print 'YES' a=int(input()) int(input()) a c=list(b.split(' ')) list(b.split(' ')) c b=input() input() b
a=int(input())
b=input()
c=list(b.split(' '))
c.sort()
for i in range(0,len(c)-1):
    if c[i]==c[i+1]:
        print('NO')
        break
    if i==len(c)-2:
        print('YES')