N = int(input())
A = list(map(int,input().split()))
dic = {}
def main():
    if N%3 == 0:
        test = {}
        temp = []
        for a in A:
            if a not in dic:
                dic[a] = 1
                test[a] = N // 3
                temp.append(a)
            else:
                dic[a] += 1
            if test == dic and temp[0] ^ temp[1] == temp[2]:
                print('Yes')
            else:
                print('No')
    else:
        print('No')
    return
main()