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: import sys
  from collections import deque
  
  sys.setrecursionlimit(4100000)
  
  
  def inputs(num_of_input):
      ins = [input() for i in range(num_of_input)]
      return ins
  
  
  def solve(inputs):
      S = inputs[0]
      T = inputs[1]
  
      appeared = {}
      appeared_count = {}
      for i, _ in enumerate(S):
          if T[i] in appeared:
              if not appeared[T[i]] == S[i]:
                  return "No"
          else:
              appeared[T[i]] = S[i]
              if S[i] in appeared_count:
                  appeared_count[S[i]] += 1
              else:
                  appeared_count[S[i]] = 1
      for k, v in appeared_count.items():
          if v > 1:
              return "No"
      return "Yes"
  
  
  def string_to_int(string):
      return list(map(int, string.split()))
  
  
  if __name__ == "__main__":
      ret = solve(inputs(2))
      print(ret)
  
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"}]