import sys
sys.setrecursionlimit(10**8)
def dfs(s,start,a,b):
    next_num = a ^ b
    if len(s) == 0:
        if start == next_num:
            print("Yes")
            exit()
        else:
            return -1
    if next_num in s:
        s.remove(next_num)
        dfs(s,start,b,next_num)
    else:
        return -1
    
def main():
    N = int(input())
    a_array = list(map(int,input().split()))
    a = a_array[0]
    for b in a_array[1:]:
        a_set = set(a_array[1:])
        a_set.remove(b)
        dfs(a_set,a,a,b)
    print("No")


if __name__ == "__main__":
    main()