
import java.util.*;

public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	}
} import java.util.*; util.* java public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	}
} Main static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	} main {
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String str=sc.next(); str sc.next() sc.next sc String str2=sc.next(); str2 sc.next() sc.next sc char ch=str2.charAt(str2.length()-1); ch str2.charAt(str2.length()-1) str2.charAt str2 str2.length()-1 str2.length() str2.length str2 1 str+=ch str ch if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No"); str.equals(str2) str.equals str str2 System.out.print("Yes") System.out.print System.out System System.out "Yes" System.out.print("No") System.out.print System.out System System.out "No" String args[] args public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	}
} public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	}
} Main

import java.util.*;

public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		 
		 String str=sc.next();
		 String str2=sc.next();
		 
		 char ch=str2.charAt(str2.length()-1);
		 str+=ch;
		 if(str.equals(str2))System.out.print("Yes");
		 else System.out.print("No");
	}
}