You want to build a word by using the letters of another word . You can cut into smaller pieces, decide which of them to use, and reorder them as you wish. Moreover, you will be happy if at most one of the letters of is missing. Would you be able to achieve your goal?
Input consists of several pairs of and , both with between 1 and lowercase letters.
For every case, print “yes” if you can (almost) build
,
and “no” otherwise.
Input
abba baba abba abac abba abcdefgh zzzzz zzz
Output
yes yes no no