Anagrams
Problem
A word is called an anagram of another word if it can be obtained by rearranging its letters.
Input
Given two words on separate lines. Words consist of lowercase Latin letters and numbers. Word lengths do not exceed 255.
Output
Required to output "YES" – if the words entered are anagrams of each other, "NO" – if not.
Input |
Output |
sharm
marsh
|
YES |
pineapples
nnaass
|
NO |
Запрещенные операторы: sort