import java.util.Scanner;

public class Main{

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	}
} import java.util.Scanner; Scanner java.util public class Main{

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	}
} Main public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	} main {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str1 = sc.next(); str1 sc.next() sc.next sc String str2 = sc.next(); str2 sc.next() sc.next sc if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        } str2.length() == str1.length()+1 str2.length() str2.length str2 str1.length()+1 str1.length() str1.length str1 1 {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        } String sub = str2.substring(0,str1.length()); sub str2.substring(0,str1.length()) str2.substring str2 0 str1.length() str1.length str1 if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        } sub.equals(str1) sub.equals sub str1 {
	        	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 public class Main{

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	}
} public class Main{

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	}
} Main
import java.util.Scanner;

public class Main{

		public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String str1 = sc.next();
	        String str2 = sc.next();
	        
	        if(str2.length() == str1.length()+1) {
	        String sub = str2.substring(0,str1.length());
	        if(sub.equals(str1)) {
	        	System.out.println("Yes"); 
	        }
	        else {
	        	System.out.println("No"); 
	        }
	        }
            
            

          
	        
            //System.out.println(res); 
	        
	}
}