P15311 [VKOSHP 2025] Array Depletion

Description

After a long journey home, the hare Xeni decided to play a game on her bunny phone. The level in the game is described by an array of length $n$ and an integer $x$. In one move, you can take $2$ adjacent elements of the array whose sum equals $x$ and remove them. After that, the size of the array will decrease by $2$. You win the level if, after a certain number of moves, the array becomes empty. The current level seemed very difficult to her, and she even doubted whether it was possible to complete it --- after all, there might be a situation where the game creators did not come up with more levels and made the last level impossible. Xeni turned to you for help --- tell her if it is possible to complete this game.

Input Format

The first line contains two integers $n$, $x$ --- the size of the array and the sum of the elements to be removed ($1 \leq n \leq 3 \cdot 10^5$, $-10^9 \leq x \leq 10^9$). The second line of each test case contains $n$ numbers $a_i$ --- the elements of the game array ($-10^9 \leq a_i \leq 10^9$).

Output Format

Print $\texttt{Yes}$, if Xeni can complete the level, and $\texttt{No}$ otherwise.