Mediumstringshashsorting
Anagram Check
Time limit 2 s · Memory 64 MB
Statement
Two lines contain two strings of lowercase Latin letters. Print YES if they are anagrams (made of the same letters with the same counts), otherwise NO.
Constraints
Each string has length between 1 and 10^5
Examples
Input 1
listen silent
Output 1
YES
Input 2
hello world
Output 2
NO