#C35. Anagram Checker

    ID: 46933 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

You are given two strings and you need to determine if they are anagrams of each other. Two strings are anagrams if and only if the sorted order of their characters (ignoring case) is identical. In mathematical terms, if \( s_1 \) and \( s_2 \) are the two strings, then they are anagrams if:

\( sorted(\text{lowercase}(s_1)) = sorted(\text{lowercase}(s_2)) \)

Your task is to process multiple test cases from the standard input and for each pair, output "YES" if they are anagrams or "NO" otherwise.

inputFormat

The first line contains a single integer \( T \) representing the number of test cases. Each of the following \( T \) lines contains two space-separated strings \( s_1 \) and \( s_2 \). It is guaranteed that both strings do not contain whitespace and consist of only alphabets.

outputFormat

For each test case, print a single line containing "YES" if the two strings are anagrams of each other (ignoring case), or "NO" otherwise.

## sample
3
Listen Silent
Hello Olelh
Test Taste
YES

YES NO

</p>