from collections import Counter

def main():
    num = int(input())
    data = list(map(int, input().split()))


    if num % 3 != 0:
        print('No')
    else:
        if num == 3:
            if data[0] ^ data[1] == data[2] and data[0] ^ data[2] == data[1] and data[1] ^ data[2] == data[0]:
                print('Yes')
            else:
                print('No')
        else:
            num_c = Counter(data)
            for ele in num_c.keys():
                if num_c[ele] % 2 != 0:
                    print('No')
                    break
            else:
                print('Yes')







if __name__ == '__main__':
    main()
