output_description: If S and T can be made equal, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      T
attempt: S = input()
  T = input()
  N = len(S)
  
  memo_s = {
      "a": -1,
      "b": -1,
      "c": -1,
      "d": -1,
      "e": -1,
      "f": -1,
      "g": -1,
      "h": -1,
      "i": -1,
      "j": -1,
      "k": -1,
      "l": -1,
      "m": -1,
      "n": -1,
      "o": -1,
      "p": -1,
      "q": -1,
      "r": -1,
      "s": -1,
      "t": -1,
      "u": -1,
      "v": -1,
      "w": -1,
      "x": -1,
      "y": -1,
      "z": -1,
  }
  memo_t = {
      "a": -1,
      "b": -1,
      "c": -1,
      "d": -1,
      "e": -1,
      "f": -1,
      "g": -1,
      "h": -1,
      "i": -1,
      "j": -1,
      "k": -1,
      "l": -1,
      "m": -1,
      "n": -1,
      "o": -1,
      "p": -1,
      "q": -1,
      "r": -1,
      "s": -1,
      "t": -1,
      "u": -1,
      "v": -1,
      "w": -1,
      "x": -1,
      "y": -1,
      "z": -1,
  }
  
  for i in range(N):
      if memo_s[S[i]] == -1 and memo_t[T[i]] == -1:
          memo_s[S[i]] = T[i]
          memo_t[T[i]] = S[i]
      else:
          if memo_s[S[i]] != T[i] or memo_t[T[i]] != S[i]:
              print("No")
              quit()
  
  print("Yes")
  
problem_description: Statement
  
  You are given strings S and T consisting of lowercase English letters.
  
  You can perform the following operation on S any number of times:
  
  Operation: Choose two distinct lowercase English letters c_1 and c_2, then
  replace every occurrence of c_1 with c_2, and every occurrence of c_2 with
  c_1.
  
  Determine if S and T can be made equal by performing the operation zero or
  more times.
samples: [{"input": "azzel\n    apple", "output": "Yes\n    \n\n`azzel` can be changed to `apple`, as follows:\n\n  * Choose `e` as c_1 and `l` as c_2. `azzel` becomes `azzle`.\n  * Choose `z` as c_1 and `p` as c_2. `azzle` becomes `apple`.\n\n* * *"}, {"input": "chokudai\n    redcoder", "output": "No\n    \n\nNo sequences of operation can change `chokudai` to `redcoder`.\n\n* * *"}, {"input": "abcdefghijklmnopqrstuvwxyz\n    ibyhqfrekavclxjstdwgpzmonu", "output": "Yes"}]