import sys

N = int(input())
A = sorted(list(map(int, input().split())))
pre = None
for a in A:
    if a == pre:
        print('NO')
        sys.exit()
    pre = a

print('YES') import sys sys N = int(input()) N int(input()) int input() input A = sorted(list(map(int, input().split()))) A sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split pre = None pre None for a in A:
    if a == pre:
        print('NO')
        sys.exit()
    pre = a a A if a == pre:
        print('NO')
        sys.exit()
     a == pre a pre print('NO') print 'NO' sys.exit() sys.exit sys exit pre = a pre a print('YES') print 'YES' pre = a a pre N = int(input()) int(input()) N A = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) A pre = None None pre
import sys

N = int(input())
A = sorted(list(map(int, input().split())))
pre = None
for a in A:
    if a == pre:
        print('NO')
        sys.exit()
    pre = a

print('YES')
