from operator import xor

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

if (n % 3 == 0) | (n % 2 == 0):
    uni = list(set(hats))
    count = [hats.count(uni[i]) for i in range(len(uni))]
    if (len(uni) in [2,3]) & len(set(count)) == 1:
        print(*(uni*count[0]))
    else:
        print('No')
else:
    print('No')
