A,B=input(),input() flg = True for c in A: if c in B: B= B.replace(c,"",1) else: flg = False break if flg:print("YES") else:print("NO")