Category

Similar Problems

0721. Anagrams

Time limit : 1000 ms
Memory limit : 64 mb

The word is an anagram of another word, if it can be obtained by rearrangement of its letters.

   Input

Two words are given in different lines. The words consist of lowercase letters. The lengths of each word is no more than 20000 and not less than 1.

   Output

    Print "YES" if the words are anagrams of each other and "NO" otherwise.

Input

Output

1

sharm

marsh

YES

2

ananas

nnaass

NO

 

 

Tayyorladi: Azat Yusupov
Text from: e-olimp.com