Problems
Anagrams
Anagrams
Two strings S1
and S2
are given. Determine, if the first string is an anagram of another. Two strings are anagrams, if one can be obtained from another by rearrangement of its letters. For example "abcde" and "bedca" are anagrams, "beta" and "teta" are not.
Input
First line contains the number of test cases t (1 ≤ t ≤ 20). Each test case is a line with two strings separated with a space. Each string contains the symbols [a...z] only and its length no more than 20 characters.
Output
For each test print YES if the given strings are anagrams, and NO otherwise.
Input example #1
2 abcde bedca beta teta
Output example #1
YES NO