import sys

fin = sys.stdin.readline
N = [int(elem) for elem in fin().split()][0]
a_list = [int(elem) for elem in fin().split()]

a_set = set(a_list)

all_xor = 0
for each_a in a_list:
    all_xor = all_xor ^ each_a

if len(a_list) % 3 == 0:
    if all_xor == 0:
        print('Yes')
    else:
        print('No')
else:
    if all_xor in a_set:
        print('Yes')
    else:
        print('No')
