a=input() b=input() for i in range(len(a)): if a[i] in b: b.replace(a[i],"") else: break if b=="": print("YES") else: print("NO")