# coding:utf-8 A = str(input()) B = str(input()) A = list(A) B = list(B) count = 0 for i in A: if i in B: B.remove(i) count += 1 else: continue if count == len(A): print("YES") else: print("NO")