def solve(): N = int(input().strip()) A = list(map(int, input().strip().split())) xor_all = 0 for a in A: xor_all ^= a if xor_all != 0: print("No") return xor_cum = 0 cnt = 0 for a in A: xor_cum ^= a if xor_cum == xor_all: xor_cum = 0 cnt += 1 if cnt >= 3: print("Yes") else: print("No") solve()