def ret(b): print("Yes" if b else "No") def solve(n, a): allxor = 0 for ai in a: allxor ^= ai if allxor != 0: return False if n > 5000: return True ok = [False] * 16384 ok[8192|a[0]] = True for ai in a[1:]: nxt = [False] * 16384 for x in range(16384): if ok[x]: nxt[x^ai] = True nxt[x&8191] = True ok = nxt return ok[0] n = int(input()) a = [int(x) for x in input().split()] ret(solve(n, a))