Buggy python submission (verdict: Time Limit Exceeded):
s=input()
t=input()
n=len(s)
sl=list(s)
tl=list(t)
l=[sl,tl]
l2=[list(x) for x in zip(*l)]
l2=sorted(l2,key=lambda x:x[0])
l2=[list(x) for x in zip(*l2)]
s=''.join(l2[0])
t=''.join(l2[1])
a=''
for i in range(n):
    if(s[i]==a):continue
    a=s[i]
    b=t[i]
    s=s.translate(str.maketrans({a:b,b:a}))
    
    
if(s==t):print("Yes")
else:print("No")


Fixed submission:
s=input()
t=input()
n=len(s)



sl=list(s)

sl.sort()
sl=''.join(sl)

a=''
for i in range(n):
    if(sl[i]==a):continue
    a=sl[i]
    b=t[s.index(a)]
    s=s.translate(str.maketrans({a:b,b:a}))
    sl=sl.translate(str.maketrans({a:b,b:a}))
    

if(s==t):print("Yes")
else:print("No")

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s=input()
t=input()
n=len(s)
sl=list(s)
tl=list(t)
l=[sl,tl]


l=np.array(l).T
l=sorted(l,key=lambda x:x[0])
l=np.array(l).T
s=''.join(l[0])
t=''.join(l[1])
a=''
for i in range(n):
    if(s[i]==a):continue
    a=s[i]
    b=t[i]
    s=s.translate(str.maketrans({a:b,b:a}))
    
    
if(s==t):print("Yes")
else:print("No")


Fixed submission:
s=input()
t=input()
n=len(s)



sl=list(s)

sl.sort()
sl=''.join(sl)

a=''
for i in range(n):
    if(sl[i]==a):continue
    a=sl[i]
    b=t[s.index(a)]
    s=s.translate(str.maketrans({a:b,b:a}))
    sl=sl.translate(str.maketrans({a:b,b:a}))
    

if(s==t):print("Yes")
else:print("No")

Buggy python submission (verdict: Time Limit Exceeded):
from operator import itemgetter
s=list(input())
t=list(input())
n=len(s)
l=[s,t]
l=[list(x) for x in zip(*l)]
l.sort(key=itemgetter(1,0))
l=[list(x) for x in zip(*l)]
s=''.join(l[0])
t=''.join(l[1])
a=''
for i in range(n):
    if(s[i]==a):continue
    a=s[i]
    b=t[i]
    s=s.translate(str.maketrans({a:b,b:a}))
    
    
if(s==t):print("Yes")
else:print("No")


Fixed submission:
s=input()
t=input()
n=len(s)



sl=list(s)

sl.sort()
sl=''.join(sl)

a=''
for i in range(n):
    if(sl[i]==a):continue
    a=sl[i]
    b=t[s.index(a)]
    s=s.translate(str.maketrans({a:b,b:a}))
    sl=sl.translate(str.maketrans({a:b,b:a}))
    

if(s==t):print("Yes")
else:print("No")

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
t=input()
n=len(s)
sl=list(s)
tl=list(t)
l=[sl,tl]
l2=[list(x) for x in zip(*l)]
l2=sorted(l2,key=lambda x:x[0])
l2=[list(x) for x in zip(*l2)]
s=''.join(l2[0])
t=''.join(l2[1])
a=''
for i in range(n):
    if(s[i]==a):continue
    a=s[i]
    b=t[i]
    s=s.translate(str.maketrans({a:b,b:a}))
    
    
if(s==t):print("Yes")
else:print("No")


Fixed submission:
s=input()
t=input()
n=len(s)



sl=list(s)

sl.sort()
sl=''.join(sl)

a=''
for i in range(n):
    if(sl[i]==a):continue
    a=sl[i]
    b=t[s.index(a)]
    s=s.translate(str.maketrans({a:b,b:a}))
    sl=sl.translate(str.maketrans({a:b,b:a}))
    

if(s==t):print("Yes")
else:print("No")

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
t=input()
n=len(s)

for i in range(n):
    a=s[i]
    b=t[i]
    s=s.translate(str.maketrans({a:b,b:a}))
    
    
if(s==t):print("Yes")
else:print("No")

Fixed submission:
s=input()
t=input()
n=len(s)



sl=list(s)

sl.sort()
sl=''.join(sl)

a=''
for i in range(n):
    if(sl[i]==a):continue
    a=sl[i]
    b=t[s.index(a)]
    s=s.translate(str.maketrans({a:b,b:a}))
    sl=sl.translate(str.maketrans({a:b,b:a}))
    

if(s==t):print("Yes")
else:print("No")