~/algor $ cat contests/round-5/G
G. Anagram?
Problem G
ICPC rules
1000 ms
128 MB
Two words and of lowercase Latin letters are given. They are anagrams if can be made by rearranging the letters of (using each exactly once). Determine whether the words are anagrams.
Input
The first line contains , the second line .
Output
YES if they are anagrams, otherwise NO.
Note
and consist of lowercase Latin letters only
Examples
Input #1
listen silent
Output #1
YES
Input #2
abc abd
Output #2
NO