from operator import xor
from functools import reduce

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

if reduce(xor, hats) == 0:
    uni = list(set(hats))

    if len(uni) in [2, 3]:
        print(*(uni * int(len(hats)/len(uni))))
    else:
        print('No')
else:
    print('No')



        
    
