Not long ago Jack read on a fence a word that was new and amusing for him. Jack
liked it so much that he wanted to invent another amusing word, but no matter
how hard he tried he couldn't do it. All the words he could invent consisted of
prefixes of the initial word and therefore didn't please Jack. He continued to
invent words that were longer and longer, but none of them was pleasing.
And now the time has come for Jack to have his last word.
The first line contains the amusing word that was written on the fence. The
second line contains Jack's last word. The words are nonempty, consist of
lower-case English letters, and are no longer than 75000 symbols.
If Jack didn't invent a new amusing word, output “No” in the first
line. In this case, show Jack how to decompose his last word into several parts
each of which is either the initial word or its nonempty prefix. Output these
parts in the second line separating them with a space. If there is no such
decomposition, output “Yes” in the only output line.
abr abracad a
Problem Author: Dmitry Ivankov
Problem Source: USU Open Personal Contest 2009 (February 28, 2009)