n = int(input())
a_list = list(map(int, input().split()))

sum_a_list = sum(a_list)
sum_a_xo_list = 0
sum_a_xo_list = ((a_list[n-1] ^ a_list[0]))
for i in range(n-1):
    sum_a_xo_list += ((a_list[i] ^ a_list[i+1]))
if sum_a_list == sum_a_xo_list:
    print('Yes')
else:
    print('No')