import java.util.*;

class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String T = sc.next();
      String result = "Yes";
      
      if(S.length()+1 != T.length()){
        result = "No";
      }
      if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      }
      
      System.out.println(result);
    }
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String T = sc.next();
      String result = "Yes";
      
      if(S.length()+1 != T.length()){
        result = "No";
      }
      if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      }
      
      System.out.println(result);
    }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String T = sc.next();
      String result = "Yes";
      
      if(S.length()+1 != T.length()){
        result = "No";
      }
      if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      }
      
      System.out.println(result);
    } main {
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String T = sc.next();
      String result = "Yes";
      
      if(S.length()+1 != T.length()){
        result = "No";
      }
      if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      }
      
      System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String T = sc.next(); T sc.next() sc.next sc String result = "Yes"; result "Yes" if(S.length()+1 != T.length()){
        result = "No";
      } S.length()+1 != T.length() S.length()+1 S.length() S.length S 1 T.length() T.length T {
        result = "No";
      } result = "No" result "No" if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      } !T.substring(0,S.length()).equals(S) T.substring(0,S.length()).equals(S) T.substring(0,S.length()).equals T.substring(0,S.length()) T.substring T 0 S.length() S.length S S {
        result = "No";
      } result = "No" result "No" System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.util.*;

class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String S = sc.next();
      String T = sc.next();
      String result = "Yes";
      
      if(S.length()+1 != T.length()){
        result = "No";
      }
      if(!T.substring(0,S.length()).equals(S)){
        result = "No";
      }
      
      System.out.println(result);
    }
}