eolymp
bolt
Try our new interface for solving problems
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 (1t20). 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.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2
abcde bedca
beta teta
Output example #1
YES
NO