logo AlgoBeat OnlineJudge
登录 注册

#214089. [VKOSHP 2024] Prank

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Katya formed the word 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 --- . Andrey admitted that he played a little . 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 could have been obtained from the string by possibly applying several .

输入格式

One test contains several sets of input data.

The first line contains one integer --- the number of sets of input data ().

In the first line of each set description, there is one string --- the word from the blocks that Katya originally had.

In the second line of each set description, there is one string --- 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 .

输出格式

For each set of input data, output , if Andrey could be telling the truth, and otherwise.

样例

样例输入 1

2
hello
havvaeeello
test
tesssst

样例输出 1

YES
NO