An anagram is a word formed by rearranging the letters of another word.
The words "listen" and "silent" has the same letters in them appearing the same number of times. This makes these two words anagram to each other.
Given two words, you need to determine if they are anagrams of each other.
The input will contain two strings and (), one per line.
and will contain lowercase alphabets only.
Print if the two words are anagrams of each other, otherwise .
Input | Output |
---|---|
listen silent | Yes |