S = eval(input())

T = eval(input())

for i in range(len(S)):

    if S[i] != T[i]:

        print("No")

        exit()

        

print("Yes")
def main():

  ## IMPORT MODULE

  #import sys



  #sys.setrecursionlimit(100000)

  #input=lambda :sys.stdin.readline().rstrip()



  #f_inf=float("inf")

  #MOD=10**9+7

  

  if 'get_ipython' in globals(): 

    ## SAMPLE INPUT

    S = "chokudai"

    T = "chokudaiz"



  else:

    ##INPUT 

    #n = input()

    #a, b = map(int, input().split())

    S = eval(input())

    T = eval(input())



  ## SUBMITION CODES HERE

  for i in range(len(S)):

    if S[i] != T[i]:

        print("No")

        exit()

        

  print("Yes")

    

main()
S = eval(input())
T = eval(input())
for i in range(len(S)):
    if S[i] != T[i]:
        print("No")
        exit()
print("Yes")

def main():
    ## IMPORT MODULE
    # import sys
    # sys.setrecursionlimit(100000)
    # input=lambda :sys.stdin.readline().rstrip()
    # f_inf=float("inf")
    # MOD=10**9+7
    if "get_ipython" in globals():
        ## SAMPLE INPUT
        S = "chokudai"
        T = "chokudaiz"
    else:
        ##INPUT
        # n = input()
        # a, b = map(int, input().split())
        S = eval(input())
        T = eval(input())
    ## SUBMITION CODES HERE
    for i in range(len(S)):
        if S[i] != T[i]:
            print("No")
            exit()
    print("Yes")


main()

-S = eval(input()) -T = eval(input()) -for i in range(len(S)): -    if S[i] != T[i]: -        print("No") -        exit() -print("Yes") +def main(): +    ## IMPORT MODULE +    # import sys +    # sys.setrecursionlimit(100000) +    # input=lambda :sys.stdin.readline().rstrip() +    # f_inf=float("inf") +    # MOD=10**9+7 +    if "get_ipython" in globals(): +        ## SAMPLE INPUT +        S = "chokudai" +        T = "chokudaiz" +    else: +        ##INPUT +        # n = input() +        # a, b = map(int, input().split()) +        S = eval(input()) +        T = eval(input()) +    ## SUBMITION CODES HERE +    for i in range(len(S)): +        if S[i] != T[i]: +            print("No") +            exit() +    print("Yes") + + +main()