A, B = [ [ j for j in input() ] for i in range(2) ] for i,s in enumerate(A): if s in B: B.remove(s) else: print('NO') break if not B: print('YES')