You are given sentences, , and containing lowercase letters, and spaces. You have to check if it is possible to reconstruct the first string using only characters in the second string, including spaces.
Input Specification
The first line will contain the string .
The second line will contain the string .
Note that it is not guaranteed there is only one space between any two letters, nor that the strings will not contain trailing/leading spaces.
Output Specification
Output YES
if it is possible to make sentence using only characters from sentence , and NO
otherwise.
Sample Input 1
aapo
aosa p
Sample Output 1
YES
Sample Input 2
aopsk
oapsk
Sample Output 2
NO
Explanation for Sample 2
There are trailing spaces in sentence that are not in sentence .
Sample Input 3
aa
a
Sample Output 3
NO
Comments