Anagrams
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Two strings S[1]
and S[2]
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.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 52%