A = list(input()) B = list(input()) for i in range(len(A)): if A[i] in B: B.remove(A[i]) if len(B) == 0: print("YES") else: print("NO")