P13972 [VKOSHP 2024] Prank
Description
Katya formed the word $s_1$ from blocks, but when she returned to the room, she saw her brother Andrey running out. Now the word made from the blocks looked different --- $s_2$. Andrey admitted that he played a little $\textit{prank}$. His prank consisted of the following: Andrey would choose a position and then insert two blocks with the same letter next to it. He could place these two blocks at the beginning of the string, at the end of the string, or between two neighboring blocks.
Help Katya determine whether Andrey told the truth, that is, whether the string $s_2$ could have been obtained from the string $s_1$ by possibly applying several $\textit{pranks}$.
Input Format
One test contains several sets of input data.
The first line contains one integer $t$ --- the number of sets of input data ($1 \le t \le 500\,000$).
In the first line of each set description, there is one string $s_1$ --- the word from the blocks that Katya originally had.
In the second line of each set description, there is one string $s_2$ --- the word from the blocks that Andrey obtained.
It is guaranteed that all words consist of lowercase Latin letters. The total length of all words does not exceed $1\,000\,000$.
Output Format
For each set of input data, output $\texttt{YES}$, if Andrey could be telling the truth, and $\texttt{NO}$ otherwise.