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