a=input() b=input() c=0 for i in b: if i in a: a.replace(i,"",1) c+=1 else: print("NO") break if c==len(b): print("YES")