Chef has learned a new technique for comparing two recipes. A recipe contains a list of ingredients in increasing order of the times they will be processed. An ingredient is represented by a letter 'a'-'z'. The i-th letter in a recipe denotes the i-th ingredient. An ingredient can be used multiple times in a recipe.
The technique is as follows. Compare two recipes by comparing their respective lists. If the sets of ingredients used in both recipes are equal and each ingredient is used the same number of times in both of them (processing order does not matter), they are declared as granama recipes. ("granama" is the Chef-ian word for "similar".)
Chef took two recipes he invented yesterday. He wanted to compare them using the technique. Unfortunately, Chef forgot to keep track of the number of times each ingredient has been used in a recipe. He only compared the ingredients but NOT their frequencies. More precisely, Chef considers two recipes as granama if there are no ingredients which are used in one recipe and not used in the other recipe.
Your task is to report whether Chef has correctly classified the two recipes (as granama or not granama) although he forgot to keep track of the frequencies.

Input
The first line of the input contains a single integer T denoting the number of test cases. The description for T test cases follows. Each test case consists of a single line containing two space-separated strings R and S denoting the two recipes.

Output
For each test case, output a single line containing "YES" (quotes for clarity) if Chef correctly classified the two recipes as granama or not granama. Otherwise, output a single line containing "NO" (quotes for clarity) if Chef declared two recipes as granama when they actually are not.

Constraints

1 ≤ T ≤ 1001 ≤ |R|, |S| ≤ 1000

Example
Input:

3
alex axle
paradise diapers
alice bob


Output:

YES
NO
YES


Explanation:
Example case 1: Chef declared them as granama recipes. They are actually granama because the sets of ingredients and the number of times each ingredient has been used are equal. The Chef got it right!
Example case 2: Chef declared them as granama recipes because both sets of ingredients are equal. But they are NOT granama since ingredient 'a' has been used twice in the first recipe but only once in the second. The Chef was incorrect!
Example case 3: Chef declare them as not granama. They are not granama as the sets of ingredients are different. Hence, the Chef was right!
import sys

def main():
  for (r, s) in testcases():
    if pseudo_granama(r, s):
      print "NO"
    else:
      print "YES"

def testcases(cin = sys.stdin):
  nc = int(cin.next())
  for _ in xrange(nc):
    r, s = cin.next().split()
    yield (r, s)

def pseudo_granama(r, s):
  r, s = list(r), list(s)
  r.sort(); s.sort()

  return (r != s) and (set(r) == set(s))

if __name__ == "__main__": sys.exit(main())