import sys
sys.setrecursionlimit(100000)
input=sys.stdin.readline
def intinput():return map(int,input().split())

import itertools
n=int(input())
a=list(intinput())
t=set(a)
if n%3!=0:
    if t=={0}:
        print("Yes")
    else:
        print("No")
    sys.exit()
if len(t)>3:
    print("No")
else:
    for i in itertools.product(tuple(t),repeat=3):
        if i[-2]^i[-1]^i[0]==0 and i[-1]^i[0]^i[1]==0 and i[0]^i[1]^i[2]==0:
            break
    else:
        print("No")
        sys.exit()
    print("Yes")