a = sorted(input()) b = input() count = 0 for i in range(len(a)): if a[i] in b: count += 1 if count == len(a): print('YES') else: print('NO')