当前位置: 代码迷 >> 综合 >> Letter(翻译)
  详细解决方案

Letter(翻译)

热度:11   发布时间:2023-12-05 15:36:05.0

来源:https://codeforces.com/contest/43/problem/B

 Letter

 

Vasya decided to write an anonymous letter cutting the letters out of a newspaper heading. He knows heading s1 and text s2 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.

Input

The first line contains a newspaper heading s1. The second line contains the letter text s2. s1 и s2 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.

Output

If Vasya can write the given anonymous letter, print YES, otherwise print NO

Examples

input

Copy

Instead of dogging Your footsteps it disappears but you dont notice anything
where is your dog

output

Copy

NO

input

Copy

Instead of dogging Your footsteps it disappears but you dont notice anything
Your dog is upstears

output

Copy

YES

input

Copy

Instead of dogging your footsteps it disappears but you dont notice anything
Your dog is upstears

output

Copy

NO

input

Copy

abcdefg hijk
k j i h g f e d c b a

output

Copy

YES

翻译:

瓦夏决定写一封匿名信,把这些信从报纸的标题中删掉。他知道航向s1和文本s2他想发送。瓦夏可以使用每个标题字母不超过一次。Vasya不必从标题中剪掉空格 - 他只是留下一些空白区域来标记它们。帮助他;看看他是否能设法撰写所需的文本。

输入

第一行包含报纸标题s1.第二行包含字母文本s2.ss2是由空格、大写和小写拉丁字母组成的非空行,其长度不超过 200 个符号。大写和小写字母应区分。Vasya 不会从标题中删去空格。

输出

如果瓦夏可以写出给定的匿名信,请打印YES,否则打印NO。