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

public class Main{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	}
	public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	}
	public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	}
} Main static PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] input=br.readLine().trim().split(" "); input br.readLine().trim().split(" ") br.readLine().trim().split br.readLine().trim() br.readLine().trim br.readLine() br.readLine br " " String a=input[0]; a input[0] input 0 input=br.readLine().trim().split(" ") input br.readLine().trim().split(" ") br.readLine().trim().split br.readLine().trim() br.readLine().trim br.readLine() br.readLine br " " String b=input[0]; b input[0] input 0 out.println(isPossible(a,b)) out.println out isPossible(a,b) isPossible a b out.flush() out.flush out out.close() out.close out String[] args args public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	} isPossible {
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	} if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   } b.length()==a.length()+1 b.length() b.length b a.length()+1 a.length() a.length a 1 {
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   } for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       } int i=0; int i=0; i 0 i<a.length() i a.length() a.length a i++ i++ i {
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       } {
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       } if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           } a.charAt(i)!=b.charAt(i) a.charAt(i) a.charAt a i b.charAt(i) b.charAt b i {
	               return "No";
	           } return "No"; "No" return "Yes"; "Yes" {
	       return "No";
	   } return "No"; "No" String a a String b b public class Main{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	}
	public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	}
} public class Main{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	}
	public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	}
} Main
import java.util.*;
import java.io.*;

public class Main{
	static PrintWriter out=new PrintWriter(System.out);
	public static void main (String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String[] input=br.readLine().trim().split(" ");
		
		
		String a=input[0];
		input=br.readLine().trim().split(" ");
		String b=input[0];
		
		out.println(isPossible(a,b));
		
		out.flush();
		out.close();
	}
	public static String isPossible(String a,String b)
	{
	   if(b.length()==a.length()+1){
	       for(int i=0;i<a.length();i++){
	           if(a.charAt(i)!=b.charAt(i)){
	               return "No";
	           }
	       }
	       return "Yes";
	   }
	   else{
	       return "No";
	   }
	}
}