import sys
sys.setrecursionlimit(10 ** 7)

debug = True
debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    N = int(input())
    a_list = list(map(int, input().split()))

    import collections
    c = collections.Counter(a_list)
    keys = sorted(c.keys())
    nk = len(keys)

    dprint(c)
    dprint(keys)

    # a[0] からスタート
    found = False
    start = keys[0]

    cand_center = []
    cand_right = []

    for i in range(1, nk):
        center = keys[i]
        max = start + center

        for j in range(i+1, nk):
            right = keys[j]
            if right > max:
                # これより大きいところにはない
                dprint("break by max condition")
                break

            if right == start ^ center:
                cand_center.append(center)
                cand_right.append(right)

    if len(cand_center) == 0:
        print("No")
        return

    if len(cand_center) > 1:
        raise ValueError("majika")

    center = cand_center[0]
    right = cand_right[0]
    c[start] = c[start] - 1
    c[center] = c[center] - 1
    c[right] = c[right] - 1

    # これで、0, second, third が決まったので、あとは順次決める
    left = center
    center = right
    dprint(start, left, center)

    cnt = 3
    while True:
        # N個作ったら終了
        if cnt == N:
            break

        # 次の数字
        right = left ^ center

        # 検索
        rcount = c.get(right, -1)
        if rcount <= 0:
            dprint("break", rcount)
            print("No")
            return

        dprint("found", right, rcount)

        # update
        c[right] = c[right] - 1
        left = center
        center = right

        cnt += 1
        dprint("next", cnt, left, center)

    if start ^ left == center:
        print("Yes")
    else:
        dprint("break", start, left, center)
        print("No")


solve()