/* 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
 
 
{
    static Scanner in = new Scanner(System.in);
    
    public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    }
    

    
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
 
 
{
    static Scanner in = new Scanner(System.in);
    
    public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    }
    

    
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	}
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    } solve {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    } String s=in.nextLine(); s in.nextLine() in.nextLine in String s1=in.nextLine(); s1 in.nextLine() in.nextLine in if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       } s.equals(s1.substring(0,s1.length()-1)) s.equals s s1.substring(0,s1.length()-1) s1.substring s1 0 s1.length()-1 s1.length() s1.length s1 1 {
           System.out.println("Yes");
       } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
           System.out.println("No");
       } System.out.println("No") System.out.println System.out System System.out "No" public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	} main {
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	} int t=1; t 1 while(t>0)
		{
		    
		    solve();
		    t--;
		} t>0 t 0 {
		    
		    solve();
		    t--;
		} solve() solve t-- t String[] args args public class Main
 
 
{
    static Scanner in = new Scanner(System.in);
    
    public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    }
    

    
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	}
} public class Main
 
 
{
    static Scanner in = new Scanner(System.in);
    
    public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    }
    

    
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	}
} 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
 
 
{
    static Scanner in = new Scanner(System.in);
    
    public static void solve()
    {
       String s=in.nextLine();
       String s1=in.nextLine();
       
       if(s.equals(s1.substring(0,s1.length()-1)))
       {
           System.out.println("Yes");
       }
       else
       {
           System.out.println("No");
       }
    }
    

    
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		
		int t=1;
	//	in.nextLine();
		
		while(t>0)
		{
		    
		    solve();
		    t--;
		}
		
		
	
	//	System.out.println(x);
	}
}
