#K6486. Anagram Checker

    ID: 32069 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

You are given two strings. Your task is to determine whether the two strings are anagrams of each other. Two strings are anagrams if and only if their sorted sequences of characters are identical. In other words, if \( sorted(s_1) = sorted(s_2) \), then the strings are anagrams.

The input consists of multiple test cases. For each test case, output "YES" if the two strings are anagrams, otherwise output "NO".

inputFormat

The first line contains an integer \( T \) representing the number of test cases. Each of the next \( T \) lines contains two space-separated strings.

outputFormat

For each test case, output a single line containing either "YES" or "NO" indicating whether the two strings are anagrams.

## sample
3
listen silent
triangle integral
apple peach
YES

YES NO

</p>