if __name__ == "__main__": str1 = [s for s in input()] str2 = [s for s in input()] ans = "YES" for j in str1: if j not in str2: ans = "NO" break print(ans)