from sys import stdin

def main():
    N = int(input())
    A = tuple(sorted(map(int, input().split())))

    a = list(A)
    for i in range(2, N):
        a[i] = a[i-1] ^ a[i-2]
    if A == tuple(a):
        print('Yes')
    else:
        print('No')

input = lambda: stdin.readline()
main()
