Two words,
and
,
are anagrams if we can rearrange the letters of
to get
.
For instance, “race” is an anagram of
“care”.
You are given four words. Determine whether you can divide them into two groups such that, after concatenating the words within each group, the two resulting strings are anagrams. Each word must belong entirely to one group and be used exactly once.
Input consists of several cases, each with four words made up only of lowercase letters. You can assume that the total number of letters of each case is not larger than 1000.
For each case, print “yes” or “no”, as
appropriate.
Input
stone race care notes a b c d aa ba bb ab zzzz z z z zzzzz zz zz z voices ran not conversation thee yes the eyes
Output
yes no yes no yes yes yes