from asyncio.windows_events import NULL A = list(input()) B = list(input()) num = 0 ans = len(B) for i in A: for j in B: if i == j: num += 1 B.remove(j) break print('YES' if num == ans else 'NO')