
N = int(input())
a = list(map(int,input().split()))

ans = []

f = True

for i in range(N):
    # print("====",i)
    if f:
        if i == 0:
            a1 = a[0]
            a2 = a[1]
            # print(a1,a2)
            # print(a)
            if a1^a2 in a:

                ans.append(a1)
                # a.remove(a1)
                ans.append(a2)
                a.remove(a2)
            else:
                f = False
                continue
        elif i == N-1:
            a1 = ans[i-1]
            a2 = ans[i]
            # print(a1,a2)
            # print(a)
            if a1^a2 in a:
                print("Yes")
                break
            else:
                print("No")
                break
        else:
            a1 = ans[i-1]
            a2 = ans[i]
            # print(a1,a2)
            # print(a)
            if a1^a2 in a:
                ans.append(a1^a2)
                a.remove(a1^a2)
            else:
                f = False
                continue
    else:
        print("No")
        break