#!/usr/bin/env python

import sys

n= int(sys.stdin.readline())
ai  = [ int(x) for x in sys.stdin.readline().split() ]
#
ans= "No"
f = ai[0]
for s in range(2,n):
    tmp= [f,ai[s]]
    for i in range(2,n):
        nn = tmp[-1] ^ tmp[-2]
        if nn in ai and not nn in tmp:
            tmp.append(nn)
        else:
            break
    #
    if len(tmp)==n and tmp[-2]==tmp[-1]^tmp[0] and tmp[-1]==tmp[0]^tmp[1]:
        ans="Yes"
        break
#
print( ans )
