405107: GYM101798 B Two Palindromes
Description
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.
InputThe 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.
OutputPrint 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).
ExamplesInputabbaOutput
YESInput
aOutput
c
NOInput
babOutput
weew
YES