a = list(input()) b = list(input()) count_num = 0 for i in a: for j in b: if i == j: count_num += 1 b.remove(j) print(["NO","YES"][len(a)==count_num])