import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### n = ni() a = na() s = 0 for i in range(n): s ^= a[i] if s: print("No") exit() b = [] c = 0 for v in a: for e in b: v = min(v,v^e) if v > 0: b.append(v) else: c += 1 if c == 1: print("No") else: print("Yes")