ravis-trouble-3
Source: hackerearth
Difficulty: EASY

Ravi is very tensed nowadays because of the design project. He has not even decided the topic yet. Micro feels very bad for Ravi, so to help Ravi take his mind off from design project for sometime he gave him a problem. He gave him two strings S and P. Now Ravi has to tell if S can be converted to P by deleting some characters of S.

Input:
First line of input consists of T the number of test cases.
Each test case contain two line. First line consists of string S and second consists of string P.

Output:
For each test case print, in a new line, "YES" (without quotes) if string S can be converted to P otherwise output "NO" (without quotes).

Constraints:
1 ≤ T ≤ 100 
1 ≤ |S| ≤ 10000 
1 ≤ |P| ≤ 10000 
Strings S and P are made of lower case letters only.

SAMPLE INPUT
2
abcde
ade
abc
pe

SAMPLE OUTPUT
YES
NO

Explanation

In first test case string "abcde" can be converted to string "ade" by deleting characters "b" and "c". So answer is YES.
In second case "abc" can not be converted to "pe" so answer is NO.


try:
	t = int(eval(input()))
	for i in range(t):
		s = list(input())
		p = list(input())
		i = 0
		flag = 0
		for j in s:
			if(p[i] == j):
				i += 1
				if(i == len(p)):
					flag = 1
					break
		if(flag == 1):
			print("YES")
		else:
			print("NO")
except:
	a = 0