a=list(input()) b=list(input()) for x in a: if x not in b: print('NO') break else: b.remove(x) else: print('YES')