def is_circle(current_list, rest_list):
    if rest_list == []:
        if (current_list[-1] ^ current_list[0]) == current_list[1]:
            return True
        else:
            return False
    if len(current_list) == 1:
        for index, num in enumerate(rest_list):
            if is_circle(current_list + [num], rest_list[:index] + rest_list[index+1:]):
                return True
            """
            next_int = current_list[0] ^ num
            if next_int in rest_list:
                if is_circle(current_list + [num], rest_list[:index] + rest_list[index+1:]):
                    return True
            """
        return False

    next_int = current_list[-1] ^ current_list[-2]
    if next_int in rest_list:
        current_list.append(next_int)
        rest_list.remove(next_int)
        return is_circle(current_list, rest_list)
    else:
        return False
        

n = int(input())
input_list = [int(i) for i in input().split(' ')]

if is_circle([input_list[0]], input_list[1:]):
    print('Yes')
else:
    print('No')