Bitvzhuh
시간 제한1초메모리 제한2048 MB
서로 다른 k비트 정수 집합이 주어질 때, 모든 쌍의 XOR을 반복해서 취하면 결국 1부터 2^k - 1까지의 모든 값을 포함하게 되는지 판정한다.
문제
Daniyar recently learned a new spell called "Bitvzhuh". Although it is a very high level spell, Daniyar was able to master it completely and unlock its deepest secrets.
"Bitvzhuh", when cast on a set of integers, transforms the set into a new set which contains the XORs of all pairs in the initial set.
Formally, say you have a set of size . After one "Bitvzhuh", turns into the set , where denotes the bitwise XOR operation.
Given the initial set and the number , find out if Daniyar can apply "Bitvzhuh" a certain non-zero number of times so that the resulting set will contain each integer in the range .
입력
The first line contains two integers and (, ): the size of the initial set and the parameter.
The second line contains distinct integers (): the elements of the initial set.
출력
Print a single line with the word "Yes" if the set will contain each integer in the range after a certain non-zero number of casts of "Bitvzhuh". Otherwise, print a single line with the word "No".
힌트
In the first example, the answer is achieved after two casts:
.
In the second example, the first cast turns the set into , and it never changes after.