405107: GYM101798 B Two Palindromes

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Two Palindromestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

A string is a palindrome if it can be read the same in both directions. For example, "madam" is a palindrome while "sir" is not.

Given two strings, each of which is a palindrome. Find if it is possible to merge all the letters of the two string in one palindrome string. That is, you need to find if it is possible to put all letters of the two strings together in one string and order them in some way to get a palindrome.

For example, if we have the two strings "abba" and "qq", we can merge them to "aqbbqa", which is a palindrome. Note that you can merge the two strings in any way, but you are not allowed to remove any of the characters.

Input

The input consists of two lines, each contains a non-empty string of no more than 100 lowercase English letters.

It is guaranteed that each of the given strings is a palindrome.

Output

Print a single line with YES if it is possible to merge the two strings into a palindrome. Otherwise, print NO.

You can print each letter in any case (upper or lower).

ExamplesInput
abba
qq
Output
YES
Input
a
c
Output
NO
Input
bab
weew
Output
YES

加入题单

算法标签: