a=list(input()) b=list(input()) for n in a: if n not in b: break b.remove(n) print("YES" if len(b)==0 else "NO")