a=input() b=input() c=0 for i in b: if i in a: c+=1 if len(a)==c: print("YES") else: print("NO")