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
  
  
  ## io ##
  def IS():
      return sys.stdin.readline().rstrip()
  
  
  def II():
      return int(IS())
  
  
  def MII():
      return list(map(int, IS().split()))
  
  
  def MIIZ():
      return list(map(lambda x: x - 1, MII()))
  
  
  ## dp ##
  def DD2(d1, d2, init=0):
      return [[init] * d2 for _ in range(d1)]
  
  
  def DD3(d1, d2, d3, init=0):
      return [DD2(d2, d3, init) for _ in range(d1)]
  
  
  ## math ##
  def to_bin(x: int) -> str:
      return format(x, "b")  # rev => int(res, 2)
  
  
  def to_oct(x: int) -> str:
      return format(x, "o")  # rev => int(res, 8)
  
  
  def to_hex(x: int) -> str:
      return format(x, "x")  # rev => int(res, 16)
  
  
  MOD = 10**9 + 7
  
  
  def divc(x, y) -> int:
      return -(-x // y)
  
  
  def divf(x, y) -> int:
      return x // y
  
  
  def gcd(x, y):
      while y:
          x, y = y, x % y
      return x
  
  
  def lcm(x, y):
      return x * y // gcd(x, y)
  
  
  def enumerate_divs(n):
      """Return a tuple list of divisor of n"""
      return [(i, n // i) for i in range(1, int(n**0.5) + 1) if n % i == 0]
  
  
  def get_primes(MAX_NUM=10**3):
      """Return a list of prime numbers n or less"""
      is_prime = [True] * (MAX_NUM + 1)
      is_prime[0] = is_prime[1] = False
      for i in range(2, int(MAX_NUM**0.5) + 1):
          if not is_prime[i]:
              continue
          for j in range(i * 2, MAX_NUM + 1, i):
              is_prime[j] = False
      return [i for i in range(MAX_NUM + 1) if is_prime[i]]
  
  
  def prime_factor(n):
      """Return a list of prime factorization numbers of n"""
      res = []
      for i in range(2, int(n**0.5) + 1):
          while n % i == 0:
              res.append(i)
              n //= i
      if n != 1:
          res.append(n)
      return res
  
  
  ## libs ##
  from itertools import (
      accumulate as acc,
      combinations as combi,
      product,
      combinations_with_replacement as combi_dup,
  )
  from collections import deque, Counter
  from heapq import heapify, heappop, heappush
  from bisect import bisect_left
  import string
  
  # ======================================================#
  
  
  def main():
      s = IS()
      t = IS()
      tidx = {a: [] for a in string.ascii_lowercase}
      sidx = {a: [] for a in string.ascii_lowercase}
      for i, ti in enumerate(t):
          tidx[ti].append(i)
      for i, si in enumerate(s):
          sidx[si].append(i)
      for k, idx in tidx.items():
          tmp = set()
          for i in idx:
              tmp.add(s[i])
          if len(tmp) > 1:
              print("No")
              return None
      for k, idx in sidx.items():
          tmp = set()
          for i in idx:
              tmp.add(t[i])
          if len(tmp) > 1:
              print("No")
              return None
      print("Yes")
  
  
  if __name__ == "__main__":
      main()
  
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"}]