a = raw_input() b = raw_input() for x in a: for y in b: if x == y: a = a.replace(x,"",1) if len(a) == 0: print "YES" else: print "NO"