A, B = input().split() for i in range(A): for j in range(B): if A[i] != B[j]: print("No") break print("Yes")