import itertools

N = int(input())
a = list(int(i) for i in input().split())

for k in range(3, N + 1):
    cnt = 0
    for p in itertools.permutations(a, k):
        for i in range(k):
            if i == 0:
                if p[k - 1] ^ p[i + 1] != p[i]:
                    if len(p) - 1 == cnt:
                        print("No")
                        exit()
                    break
            elif i == k - 1:
                if p[i - 1] ^ p[0] != p[i]:
                    if len(p) - 1 == cnt:
                        print("No")
                        exit()
                    break
                else:
                    # a = (set(a) - set(p))
                    # a.add(p[i - 1])
                    # a.add(p[0])
                    if k == N:
                        print("Yes")
                        exit()
            else:
                if p[i - 1] ^ p[i + 1] != p[i]:
                    if len(p) - 1 == cnt:
                        print("No")
                        exit()
                    break
        cnt = cnt + 1