Anagram Check
Determine whether two strings are anagrams, ignoring letter case. They must otherwise contain exactly the same characters with the same frequencies.</p>
Input
The input contains two non-empty strings a and b, one per line, each of length at most 1000000.
Output
Print YES if the strings are anagrams; otherwise print NO.
Examples
Input #1
listen
silentOutput #1
YESExplanation #1: listen and silent contain exactly the same letters with the same frequencies.
Input #2
Listen
SILENTOutput #2
YESExplanation #2: Case is ignored, so Listen and SILENT are also anagrams.
Comments