S = eval(input())

T = eval(input())

alp = ['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']

ans = 'No'

for i in range(len(alp)):

    if S + alp[i] == T:

        ans = 'Yes'

        break

print(ans)
S = eval(input())

T = eval(input())

if S == T[:-1]:

    print('Yes')

else:

    print('No')
S = eval(input())
T = eval(input())
alp = [
    "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",
]
ans = "No"
for i in range(len(alp)):
    if S + alp[i] == T:
        ans = "Yes"
        break
print(ans)

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

-alp = [ -    "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", -] -ans = "No" -for i in range(len(alp)): -    if S + alp[i] == T: -        ans = "Yes" -        break -print(ans) +if S == T[:-1]: +    print("Yes") +else: +    print("No")