num = int(input())
table = list(map(int, input().split()))
count = 0
list.sort(table)
if num == 2:
        if table[0] == table[1]:
            count += 1
else:
    for i in range(1, num-1):
        if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue
if count == 0:
    print('YES')
else:
    print('NO') num = int(input()) num int(input()) int input() input table = list(map(int, input().split())) table list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split count = 0 count 0 list.sort(table) list.sort list sort table if num == 2:
        if table[0] == table[1]:
            count += 1
else:
    for i in range(1, num-1):
        if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue num == 2 num 2 if table[0] == table[1]:
            count += 1 table[0] == table[1] table[0] table 0 table[1] table 1 count += 1 count 1 for i in range(1, num-1):
        if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue i range(1, num-1) range 1 num-1 num 1 if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue num == 2 num 2 if table[0] == table[1]:
                count += 1
         table[0] == table[1] table[0] table 0 table[1] table 1 count += 1 count 1 elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
         table[i] == table[i+1] or table[i-1] == table[i] table[i] == table[i+1] table[i] table i table[i+1] table i+1 i 1 table[i-1] == table[i] table[i-1] table i-1 i 1 table[i] table i count += 1 count 1 continue if count == 0:
    print('YES')
else:
    print('NO') count == 0 count 0 print('YES') print 'YES' print('NO') print 'NO' count += 1 1 count num = int(input()) int(input()) num count += 1 1 count table = list(map(int, input().split())) list(map(int, input().split())) table count = 0 0 count count += 1 1 count
num = int(input())
table = list(map(int, input().split()))
count = 0
list.sort(table)
if num == 2:
        if table[0] == table[1]:
            count += 1
else:
    for i in range(1, num-1):
        if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue
if count == 0:
    print('YES')
else:
    print('NO')