l = []
n = 0


def abc(inp, rest, dic, idx):
    if len(rest) == 0:
        if l[dic[n - 1]] ^ l[dic[1]] == l[dic[0]]:
            return True
        else:
            return False
    for i in rest:
        if l[i] ^ l[dic[idx - 1]] == inp:
            cur_rest = rest[:]
            cur_rest.remove(i)
            cur_dic = dic.copy()
            cur_dic[idx + 1] = i
            if abc(l[i], cur_rest, cur_dic, idx + 1):
                return True
    return False


if __name__ == '__main__':
    n = int(input())
    l = list(map(int, input().split()))
    rest = [i for i in range(0, n)]
    dic = {}
    rest.remove(0)
    dic[1] = 0
    for i in range(1, n):
        cur_rest = rest[:]
        cur_rest.remove(i)
        cur_dic = dic.copy()
        cur_dic[0] = i
        if abc(l[0], cur_rest, cur_dic, 1):
            print("Yes")
            exit()
    print("No")
