import java.util.*; 
 
class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
		String k=sc.next();
        String l=sc.next();
  		String m=l.substring(0,l.length()-1);
    
 	if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 }
 
    }
} import java.util.*; util.* java class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
		String k=sc.next();
        String l=sc.next();
  		String m=l.substring(0,l.length()-1);
    
 	if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 }
 
    }
} Main public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
		String k=sc.next();
        String l=sc.next();
  		String m=l.substring(0,l.length()-1);
    
 	if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 }
 
    } main {
	Scanner sc=new Scanner(System.in);
		String k=sc.next();
        String l=sc.next();
  		String m=l.substring(0,l.length()-1);
    
 	if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 }
 
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String k=sc.next(); k sc.next() sc.next sc String l=sc.next(); l sc.next() sc.next sc String m=l.substring(0,l.length()-1); m l.substring(0,l.length()-1) l.substring l 0 l.length()-1 l.length() l.length l 1 if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 } k.equals(m) k.equals k m {
    		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[] args args
import java.util.*; 
 
class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
		String k=sc.next();
        String l=sc.next();
  		String m=l.substring(0,l.length()-1);
    
 	if(k.equals(m)){
    		System.out.println("Yes");
    	}else{
     		System.out.println("No");
   	 }
 
    }
}