Shuffle the letters
Given two words, we would like to know if one can be produced (without extra letters) as a result of shuffling the letters of the second one.
The input contains two space-separated words.
The program should print
Yesif it’s possible to obtain the first word by shuffling the letters of the second one and
Time limit: 1 seconds
Memory limit: 512 MB
Output limit: 1 MB