n=int(input()) a=list(map(int,input().split())) s=a[0] for i in range(1,n): s^=a[i] if s!=0: print('No') exit() if n>5002: print('Yes') exit() dp=[[0]*(1<<13) for _ in range(n)] x=a[0] for i in range(n-1): dp[i+1][x]=1 for j in range(1<<13): if dp[i][j]: dp[i+1][j]=1 dp[i+1][a[i+1]^j]=1 x^=a[i+1] if dp[-1][0]: print('Yes') else: print('No')