#abc110c. [abc110_c]String Transformation
[abc110_c]String Transformation
Problem Statement
You are given strings and consisting of lowercase English letters.
You can perform the following operation on any number of times:
Operation: Choose two distinct lowercase English letters and , then replace every occurrence of with , and every occurrence of with .
Determine if and can be made equal by performing the operation zero or more times.
Constraints
- and consists of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Output
If and can be made equal, print Yes
; otherwise, print No
.
Sample Input 1
azzel
apple
Sample Output 1
Yes
azzel
can be changed to apple
, as follows:
- Choose
e
as andl
as .azzel
becomesazzle
. - Choose
z
as andp
as .azzle
becomesapple
.
Sample Input 2
chokudai
redcoder
Sample Output 2
No
No sequences of operation can change chokudai
to redcoder
.
Sample Input 3
abcdefghijklmnopqrstuvwxyz
ibyhqfrekavclxjstdwgpzmonu
Sample Output 3
Yes