import sys input = lambda: sys.stdin.readline().strip() import bisect def Map(): return list(map(int,input().split())) N = int(input()) A = Map() M = 8192 dp = [0 for j in range(8192*(N+1))] for n in range(N): a = A[n] dp[(n+1)*M + a] = 1 for j in range(8192): if dp[n*M+j]: dp[(n+1)*M+j] = 1 dp[(n+1)*M + (a^j)] = 1 if dp[(N-1)*M] == 1: print('Yes') else: print('No')