import java.util.*;
class Main {
 
    
    public static void main(String[] str)
    {
    	Scanner s=new Scanner(System.in);
    	String s1=s.next();
    	String s2=s.next();
    	int n=s2.length();
    	int i=0;
    	String res=s2.substring(i,n-1);
    	if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	}
   
    	
    }
} import java.util.*; util.* java class Main {
 
    
    public static void main(String[] str)
    {
    	Scanner s=new Scanner(System.in);
    	String s1=s.next();
    	String s2=s.next();
    	int n=s2.length();
    	int i=0;
    	String res=s2.substring(i,n-1);
    	if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	}
   
    	
    }
} Main public static void main(String[] str)
    {
    	Scanner s=new Scanner(System.in);
    	String s1=s.next();
    	String s2=s.next();
    	int n=s2.length();
    	int i=0;
    	String res=s2.substring(i,n-1);
    	if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	}
   
    	
    } main {
    	Scanner s=new Scanner(System.in);
    	String s1=s.next();
    	String s2=s.next();
    	int n=s2.length();
    	int i=0;
    	String res=s2.substring(i,n-1);
    	if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	}
   
    	
    } Scanner s=new Scanner(System.in); s new Scanner(System.in) String s1=s.next(); s1 s.next() s.next s String s2=s.next(); s2 s.next() s.next s int n=s2.length(); n s2.length() s2.length s2 int i=0; i 0 String res=s2.substring(i,n-1); res s2.substring(i,n-1) s2.substring s2 i n-1 n 1 if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	} res.equals(s1) res.equals res s1 {
    		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" String[] str str
import java.util.*;
class Main {
 
    
    public static void main(String[] str)
    {
    	Scanner s=new Scanner(System.in);
    	String s1=s.next();
    	String s2=s.next();
    	int n=s2.length();
    	int i=0;
    	String res=s2.substring(i,n-1);
    	if(res.equals(s1))
    	{
    		System.out.println("Yes");
    	}
    	else
    	{
    		System.out.println("No");
    	}
   
    	
    }
}