Letter

TimeLimit:2000MS  MemoryLimit:256MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

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

SampleInput 1
Instead of dogging Your footsteps it disappears but you dont notice anything
where is your dog
SampleOutput 1
NO
SampleInput 2
Instead of dogging Your footsteps it disappears but you dont notice anything
Your dog is upstears
SampleOutput 2
YES
SampleInput 3
Instead of dogging your footsteps it disappears but you dont notice anything
Your dog is upstears
SampleOutput 3
NO
SampleInput 4
abcdefg hijk
k j i h g f e d c b a
SampleOutput 4
YES
Submit
题目统计信息详细
总AC数22
通过人数22
尝试人数22
总提交量27
AC率81.48%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: