信件AI (CI翻译)
Vasya decided to write an anonymous letter cutting the letters out of a newspaper heading. He knows heading $*s*_{1}$ and text $*s*_{2}$ that he wants to send. Vasya can use every single heading letter no more than once. Vasya doesn't have to cut the spaces out of the heading — he just leaves some blank space to mark them. Help him; find out if he will manage to compose the needed text.
Vasya 决定从报纸标题中剪下字母,拼写一封匿名信。他知道想要寄出的标题 $*s*_{1}$ 和正文 $*s*_{2}$。Vasya 每个标题字母最多只能使用一次。Vasya 不需要从标题中剪下空格,只需保留相应的空白位置即可。请帮助他判断能否拼出所需的正文。AI (CI翻译)
Input
输入格式
AI (CI翻译)The first line contains a newspaper heading $*s*_{1}$. The second line contains the letter text $*s*_{2}$. $*s*_{1}$ и $*s*_{2}$ are non-empty lines consisting of spaces, uppercase and lowercase Latin letters, whose lengths do not exceed 200 symbols. The uppercase and lowercase letters should be differentiated. Vasya does not cut spaces out of the heading.
第一行包含报纸标题 $*s*_{1}$。第二行包含信件正文 $*s*_{2}$。$*s*_{1}$ 和 $*s*_{2}$ 是非空字符串,仅由空格以及大写和小写拉丁字母组成,长度均不超过 200 个字符。大写字母和小写字母应视为不同的字符。Vasya 不会从标题中剪下空格。AI (CI翻译)
Output
输出格式
AI (CI翻译)If Vasya can write the given anonymous letter, print YES, otherwise print NO
如果 Vasya 能写出给定的匿名信,输出 YES,否则输出 NO。AI (CI翻译)
样例
Instead of dogging Your footsteps it disappears but you dont notice anything
where is your dog
NO
Instead of dogging Your footsteps it disappears but you dont notice anything
Your dog is upstears
YES
Instead of dogging your footsteps it disappears but you dont notice anything
Your dog is upstears
NO
abcdefg hijk
k j i h g f e d c b a
YES
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。