In this problem, you are given two strings S1 and S2, your task is to determine whether one string is an anagram of the other. An anagram of a string is a string obtained by permuting the letters of a string. For example aaba and aaab are anagrams, while abcd and deba are not.


Input

The first line would consist of the number of test cases 'T'. This would be followed by 'T' lines consisting of two space separated strings. The strings would consist of only letters 'a'-'z'. Each string would consist of no more than 20 characters.


Output

You have to print "YES" if one string is an anagram of the other or "NO" otherwise.


Example

Input:
2
aaba aaab
abcd deba

Output:
YES
NO
t =int(raw_input())

for i in range(0,t):
    input = raw_input().split(" ")
    a = input[0]
    b =input[1]
    da = {}
    for ch in a:
        if da.has_key(ch):
            da[ch]+=1
        else:
            da[ch]=1
    db={}
    for ch in b:
        if db.has_key(ch):
            db[ch]+=1
        else:
            db[ch]=1
    
    ans = "YES"
    if len(a) != len(b):
        ans = "NO"
    else:    
        for key in da:
            if not  db.has_key(key):
                ans = "NO"
                break
            if da[key] != db[key]:
                ans = "NO"
                break
        
    print ans