Letβs have a new definition of string equivalence (~). Two strings a and b are equivalent if they have the same length and one of the two cases holds:
a is identical to b (a == b)
If we split a into two strings of the same size a1 and a2, and string b into two strings of the same size b1 and b2, then:
a1 is equivalent to b1, and a2 is equivalent to b2 (a1 ~ b1 and a2 ~ b2)
a1 is equivalent to b2, and a2 is equivalent to b1 (a1 ~ b2 and a2 ~ b1)
Given two strings a and b, you are asked to find out if these two strings are equivalent.
Input
The first line of the input contains the string a (1 β€ |a| β€ ).
The second line of the input contains the string b (1 β€ |b| β€ ).
Both of the lengths |a| and |b| are a power of 2.
Output
The program should print Yes if a is equivalent to b, and No otherwise.
Examples
Input
Output
bbcb
bcbb
Yes
bbaa
baba
No
Explanation
bbcb β bb + cb, bcbb β bc + bb β bb is equivalent to bb, while cb is equivalent to bc as we can split cb β c + b, and bc β b + c β they are equivalent.
bbaa β bb + aa, baba β ba + ba β no pairs are equivalent because if we split them further, weβll need to compare aa to any of the ba-s, and therefore, as there are no b-s in aa, the two strings will not be equivalent.