Problem: 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.

Solution (in PYTHON):

Solution:
try:
    n = int(raw_input())
    i=0
    while(i<n):
        st1 = list(raw_input())
        st2 = list(raw_input())
        a=b=num=flag=0
        while(a<len(st1)):
            if (st2[b] == st1[a]):
                num+=1
                b+=1
                a+=1
            else:
                a+=1
            if (num == len(st2)):
                flag = 1
                break
        if (flag == 1):
            print "YES"
        else:
            print "NO"
        i+=1
except:
    x=0