A = input() B = input() cnt=0 A = list(A) for i in B: if i in A: A.remove(i) cnt+=1 else: break if not A: print("YES") else: print("NO")