292. Same Shape, Different Letters
Two strings are isomorphic when the characters of one can be replaced to give the other, with each character always mapping to the same one, and no two characters mapping to the same one.
egg add -> Yes (e to a, g to d)
foo bar -> No (o would have to be both a and r)
badc baba -> No (d and c would both map to b)
One map is not enough. Mapping each character of the first string to one of the second allows two different characters to land on the same target, which the third example rules out. You need the mapping to be consistent in BOTH directions.
Constraints - `1 ≤ length of each string ≤ 200000` - Both strings are lowercase letters.
Input
The first line contains the string a.
The second line contains the string b.
Both consist of lowercase letters.
Output
Print Yes or No on one line.