import bisect

n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()

ret_list = []
ret_list.append(a_list.pop(0))

flag = True
while True:
    ret_len = len(ret_list)
    left_v = ret_list[ret_len-1]
    a_len = len(a_list)

    if a_len != 0:
        for i in range(0, a_len):
            mid_v = a_list[i]
            right_v = left_v ^ mid_v
            serch_list_low = a_list[0:i]
            serch_list_high = a_list[i+1:]
            if right_v >= mid_v:
                ind = bisect.bisect_left(serch_list_high, right_v)
                if ind < len(serch_list_high):
                    if serch_list_high[ind] == right_v:
                        r = a_list.pop(i+ind+1)
                        m = a_list.pop(i)
                        ret_list.append(m)
                        ret_list.append(r)
                        break
            else:
                ind = bisect.bisect_left(serch_list_low, right_v)
                if ind < len(serch_list_low):
                    if serch_list_low[ind] == right_v:
                        m = a_list.pop(i)
                        r = a_list.pop(ind)
                        ret_list.append(m)
                        ret_list.append(r)
                        break

            if i == a_len-1:
                flag = False
    else:
        right_v = ret_list[-2] ^ ret_list[-1]
        if right_v != ret_list[0]:
            flag = False
        else:
            break

    if not flag:
        break

if flag:
    print('Yes')
else:
    print('No')
