Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
dics ={}
dic ={}
for i in range(len(S)):
  if S[i] in dics:
  	dics[S[i]]=[dics[S[i]],i]
  else :
    dics[S[i]]=[i]
  if T[i] in dic:
    dic[T[i]]=[dic[T[i]],i]
  else:
    dic[T[i]]=[i]

for i in range(len(S)):
  if dics[S[i]]!=dic[T[i]] and (T[i] in dics and S[i] in dic and dics[T[i]]!=dic[S[i]]):
    print("No")
    exit()
print("Yes")
  

Fixed submission:
S=input()
T=input()
convert = {}
flag=1
for s,t in zip(S,T):
  if s in convert and convert[s]!=t:
    flag=0
    break
  convert[s] = t
after = convert.values()
if len(after)!= len(set(after)):
  flag = 0

print("Yes" if flag else "No")

Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
dics ={}
dic ={}
for i in range(len(S)):
  if S[i] in dics:
  	dics[S[i]]=[dics[S[i]],i]
  else :
    dics[S[i]]=[i]
  if T[i] in dic:
    dic[T[i]]=[dic[T[i]],i]
  else:
    dic[T[i]]=[i]
for i in range(len(S)):
  if dics[S[i]]!=dic[T[i]] and (T[i] in dics and dics[T[i]]!=dic[S[i]]):
    print("No")
    exit()
print("Yes")
  

Fixed submission:
S=input()
T=input()
convert = {}
flag=1
for s,t in zip(S,T):
  if s in convert and convert[s]!=t:
    flag=0
    break
  convert[s] = t
after = convert.values()
if len(after)!= len(set(after)):
  flag = 0

print("Yes" if flag else "No")

Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
dics ={}
dic ={}
for i in range(len(S)):
  if S[i] in dics:
  	dics[S[i]]=[dics[S[i]],i]
  else :
    dics[S[i]]=[i]
  if T[i] in dic:
    dic[T[i]]=[dic[T[i]],i]
  else:
    dic[T[i]]=[i]
print(dic)
for i in range(len(S)):
  if dics[S[i]]!=dic[T[i]] and (T[i] in dics and dics[T[i]]!=dic[S[i]]):
    print("No")
    exit()
print("Yes")
  

Fixed submission:
S=input()
T=input()
convert = {}
flag=1
for s,t in zip(S,T):
  if s in convert and convert[s]!=t:
    flag=0
    break
  convert[s] = t
after = convert.values()
if len(after)!= len(set(after)):
  flag = 0

print("Yes" if flag else "No")

Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
dics ={}
dic ={}
for i in range(len(S)):
  if S[i] in dics:
  	dics[S[i]]=[dics[S[i]],i]
  else :
    dics[S[i]]=i
  if T[i] in dic:
    dic[T[i]]=[dic[T[i]],i]
  else:
    dic[T[i]]=i
for i in range(len(S)):
  if dics[S[i]]!=dic[T[i]] and (T[i] in dics and dics[T[i]]!=dic[S[i]]):
    print("No")
    exit()
print("Yes")

  

Fixed submission:
S=input()
T=input()
convert = {}
flag=1
for s,t in zip(S,T):
  if s in convert and convert[s]!=t:
    flag=0
    break
  convert[s] = t
after = convert.values()
if len(after)!= len(set(after)):
  flag = 0

print("Yes" if flag else "No")

Buggy python submission (verdict: Runtime Error):
S = list(input())
T = list(input())
dics ={}
dic ={}
for i in range(len(S)):
  if S[i] in dics:
  	dics[S[i]].append(i)
  else :
    dics[S[i]]=i
  if T[i] in dic:
  	dic[T[i]].append(i)
  else:
    dic[T[i]]=i
for i in range(len(S)):
  if dics[S[i]]!=dic[T[i]] and (T[i] in dics and dics[T[i]]!=dic[S[i]]):
    print("No")
    exit()
print("Yes")

  

Fixed submission:
S=input()
T=input()
convert = {}
flag=1
for s,t in zip(S,T):
  if s in convert and convert[s]!=t:
    flag=0
    break
  convert[s] = t
after = convert.values()
if len(after)!= len(set(after)):
  flag = 0

print("Yes" if flag else "No")