N = int(input())
a = list(map(int, input().split()))
b = list(set(a))
flag = False
if len(b) == 3:
    if b[0] ^ b[1] == b[2]:
        flag = True

if flag:
    print('Yes')
else:
    print('No')
        
    