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