n,*a=map(int,open(0).read().split()) m=1<<13 x=0 for i in a: x^=i if x: exit(print('No')) if n>5001: exit(print('Yes')) dp=[[1<<60]*m for _ in range(n+1)] dp[1][a[0]]=1 for i in range(2,n+1): c=a[i-1] for j in range(m): dp[i][j]=min(dp[i][j],dp[i-1][j]) dp[i][j^c]=min(dp[i][j^c],dp[i-1][j]+1) if dp[n][0]