s1=list(input ()) s2=list(input ()) def sam(st, st2): for i in range(len(st2)): if st==st2[i]: st2.pop(i) return(st2) break return(0) y=1 for i in range(len(s1)): if sam(s1[i],s2)==0: print("NO") y=0 break if y==1: print("YES")