def main(): a = list(input()) b = list(input()) i = 0 while i < len(a): flag = False j = 0 while j < len(b): if a[i] == b[j]: match_char = a[i] flag = True break else: j += 1 if flag: b.remove(match_char) a.remove(match_char) else: i += 1 if len(b) != 0: print("NO") if len(b) == 0: print("YES") if __name__ == "__main__": main()