A missing letter P57710


Statement
 

pdf   zip

You want to build a word ss by using the letters of another word tt. You can cut tt 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 ss is missing. Would you be able to achieve your goal?

Input

Input consists of several pairs of ss and tt, both with between 1 and 10510^5 lowercase letters.

Output

For every case, print “yes” if you can (almost) build ss, and “no” otherwise.

Public test cases
  • Input

    abba baba
    abba abac
    abba abcdefgh
    zzzzz zzz
    

    Output

    yes
    yes
    no
    no
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Official solutions
    C++
    User solutions
    C++