Benjamin Button's Letter to Daughter


For what it's worth:
It's never too late or, in my case, too early to be whoever you want to be.
There's no time limit. Start whenever you want.
You can change or stay the same. There are no rules to this thing.
We can make the best or the worst of it. I hope you make the best of it.
And I hope you see things that startle you.
I hope you feel things you never felt before.
I hope you meet people with a different point of view.
I hope you live a life you're proud of.
If you find that you're not, I hope you have the strength to start all over again.

  •  如下要说的是非常有价值的:
  • 在我看来,你想成为何人没有早晚之说。
  • 没有时间的限制。你想什么时候开始就什么时候开始。
  • 你可以改变或者一尘不变。这个东西没有什么准则。
  • 我们可以做到最好,或者做到最差。我希望你能做到最好。
  • 我希望你能看到令你惊奇到的事。
  • 我希望你能感受到以前前所未有的感觉。
  • 我希望你能遇见不同的人。
  • 我希望你过着你为之而感到自豪的生活。
  • 如果你发现不是这样,我希望你能用能力重新开始。
  1. startle 惊吓

Shizuka's Letter


Nobita receives a letter from Shizuka. For the sake of security, the letter's content T is produced as follows, first the message is written, then the substitution cipher and transposition cipher is applied to the message. Finally, the encrypted message is inserted into another text.nnSubstitution cipher changes all occurrences of each letter to some other letter. Substitutes for all letters must be different. For example, after substitution cipher, the message "BBA" can become "AAC".nnTransposition cipher applies some permutation to the letters of the message. For example, after applying the permutation (1, 3, 2), the second letter moves to the third place, the third letter moves to the second place, so the message "AAC" turns to "ACA".nnFor example, suppose the original message is "BBA", after substitution, it becomes "AAC", then after transposition, it becomes "ACA". Finally the encrypted message "ACA" is inserted into another text "CBC", after letter 'B', so the content of the letter is "CBACAC".nnNobita don't know what the original message is, but he guesses the message should be P. Now given the letter's content T and Nobita's guess P, you should determine if Nobita's guess is possible to be right.nnInputnnThere are multiple cases.nnFor each case, the first line is letter's content T, the second line is Nobita's guess P. P and T are strings consist of characters whose ASCII code is between 33 ('!') and 126 ('~'). The length of P and T is no more than 500000. P is guaranteed to be shorter than T.nnOutputnnFor each case, if Nobita's guess is possible to be right, output "Yes", otherwise output "No". If the answer is "Yes", it should be followed by another line of integers which denote all the positions (0-based) of the message in the content.nSample InputnnCBACACnBBAnABCDEnBBAnSample OutputnnYesn2 3nNo