from operator import xor

n = int(input())
hats = list(map(int, input().split(' ')))

uni = list(set(hats))
count = [hats.count(uni[i]) for i in range(len(uni))]

if n % 3 == 0:
    if (len(uni) == 3) & len(set(count)) == 1:
        print(*(uni*count[0]))
    else:
        print('No')
elif n % 2 == 0:
    if (len(uni) == 2) & len(set(count)) == 1:
        print(*(uni*count[0]))
    else:
        print('No')
else:
    print('No')