a=list(input()) b=list(input()) x=0 for i in range(len(a)): if a[i] in b: b[b.index(a[i])]="1" else: x+=1 print("NO") break if x==0: print("YES")