/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    }
} Main public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    } main {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.next(); S s.next() s.next s String T = s.next(); T s.next() s.next s if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No"); T.length()==S.length()+1 T.length() T.length T S.length()+1 S.length() S.length S 1 {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        } if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No"); (S+T.charAt(T.length()-1)).equals(T) (S+T.charAt(T.length()-1)).equals (S+T.charAt(T.length()-1)) S T.charAt(T.length()-1) T.charAt T T.length()-1 T.length() T.length T 1 T System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    }
} public class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    }
} Main
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        if(T.length()==S.length()+1)
        {
            if((S+T.charAt(T.length()-1)).equals(T))
                System.out.println("Yes");
            else
                System.out.println("No");
        }
        else
            System.out.println("No");
    }
}
