Po (strikes back): i am not a big, fat panda, i'm the big, fat panda! q. which word best describes how po reacted to tai lung's attack? a. sternly b. impatiently c. rudely d. proudly
Our hacker, little stuart lately has been fascinated by ancient puzzles. one day going through some really old books he finds something scribbled on the corner of a page. now little stuart believes that the scribbled text is more mysterious than it originally looks, so he decides to find every occurrence of all the permutations of the scribbled text in the entire book. since this is a huge task, little stuart needs your help, he needs you to only figure out if any permutation of the scribbled text exists in the given text string, so he can save time and analyze only those text strings where a valid permutation is present.
input:
first line contains number of test cases t.each test case contains two lines ,first line contains pattern and next line contains a text string. all characters in both the strings are in lowercase only [a-z].
output:
for each test case print "yes" or "no" (quotes for clarity) depending on whether any permutation of the pattern exists in the text string.
constraints:
1 ≤ t ≤ 100
1 ≤ |pattern| ≤ 1000
1 ≤ |text string| ≤ 100000