import sys

def main():
    _ = input()
    k = [int(x) for x in input().split()]
    
    s0 = k[0]
    s2 = -1
    s1 = -1
    
    for i in range(1, len(k)):
        for j in range(1, len(k)):
            if i == j:
                continue
            if s0 ^ k[i] == k[j]:
                s2 = k[i]
                s1 = k[j]
                k.pop(max(i,j))
                k.pop(min(i,j))
                break
    
    if s2 == -1 or s1 == -1:
        print('No')
        sys.exit()

    while len(k) > 0:
        s0 = s1
        s1 = s2
        s2 = -1
        for i in range(len(k)):
            if s0 ^ s1 == k[i]:
                s2 = k[i]
                k.pop(i)
                break
        if s2 == -1:
            print('No')
            sys.exit()
    
    print('Yes')

if __name__=='__main__':
    main()