def gen_alist(a_0,a_1):
    generated_alist = [a_0,a_1]
    for i in range(N-2):
        a_0, a_1 = a_1, a_0^a_1
        generated_alist.append(a_1)
        return generated_alist



N = int(input())
a_list = list(map(int,input().split()))
a_0 = a_list[0]
ans = False
for i in range(1,N):
    if a_0^a_list[i] in a_list:
        ans = gen_alist(a_0, a_list[i])
        if sum(ans) == sum(a_list):
            ans = True

if ans:
    print("Yes")
else:
    print("No")