import itertools
import copy

def main():
    n = int(input())
    d_list = [int(i) for i in input().rstrip().split(' ')]
    a_list = list(itertools.permutations(d_list))
    flg = False
    
    for a in a_list:
        flg_2 = True
        for i in range(len(a)):
            if i == 0:
                calc = a[-1] ^ a[i+1]
            elif i == len(d_list)-1:
                calc = a[i-1] ^ a[0]
            else:
                calc = a[i-1] ^ a[i+1]
            if a[i] != calc:
                flg_2 = False
                break
        if flg_2:
            print('Yes')
            return
        
    print("No")
    return

main()