a= [eval(input()) for i in range(2)]

S=a[0]

T=a[1]



def CK(S,T):



    m=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

    for a in range(len(m)):

        Sa=S+m[a]

        if(T == Sa):

            return True

            break

        else:

            a=a+1



reslt=CK(S,T)

# print(reslt)



if(reslt==True):

    print("Yes")

else:

    print("No")

S=eval(input())

T=eval(input())



if T[:-1]==S:

	print("Yes")

	exit()



print("No")
a = [eval(input()) for i in range(2)]
S = a[0]
T = a[1]


def CK(S, T):
    m = [
        "a",
        "b",
        "c",
        "d",
        "e",
        "f",
        "g",
        "h",
        "i",
        "j",
        "k",
        "l",
        "m",
        "n",
        "o",
        "p",
        "q",
        "r",
        "s",
        "t",
        "u",
        "v",
        "w",
        "x",
        "y",
        "z",
    ]
    for a in range(len(m)):
        Sa = S + m[a]
        if T == Sa:
            return True
            break
        else:
            a = a + 1


reslt = CK(S, T)
# print(reslt)
if reslt == True:
    print("Yes")
else:
    print("No")

S = eval(input())
T = eval(input())
if T[:-1] == S:
    print("Yes")
    exit()
print("No")

-a = [eval(input()) for i in range(2)] -S = a[0] -T = a[1] - - -def CK(S, T): -    m = [ -        "a", -        "b", -        "c", -        "d", -        "e", -        "f", -        "g", -        "h", -        "i", -        "j", -        "k", -        "l", -        "m", -        "n", -        "o", -        "p", -        "q", -        "r", -        "s", -        "t", -        "u", -        "v", -        "w", -        "x", -        "y", -        "z", -    ] -    for a in range(len(m)): -        Sa = S + m[a] -        if T == Sa: -            return True -            break -        else: -            a = a + 1 - - -reslt = CK(S, T) -# print(reslt) -if reslt == True: +S = eval(input()) +T = eval(input()) +if T[:-1] == S: -else: -    print("No") +    exit() +print("No")