import sys

def solve(n, a):  
    set_a = set(a)
    a_0 = a[0]
    for i in range(n):
        if i == 0:
            continue

        prev_a = a[i]
        next_a = a_0 ^ a[i]
        if next_a not in set_a:
            continue
        count = 0
        while count < n :
            next_next_a = prev_a ^ next_a
            if next_next_a not in set_a:
               break
            count += 1
            prev_a = next_a
            next_a = next_next_a
        
        if count == n:
            return 'Yes'

    return 'No'


if __name__ == '__main__':
    n = int(sys.stdin.readline().strip())
    a = map(int, sys.stdin.readline().strip().split(" "))
    print solve(n, a)