import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    
    String S = stdIn.next();
    String T = stdIn.next();
    
    int count = 0;
    for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    }
    
    if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}

      
     import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    
    String S = stdIn.next();
    String T = stdIn.next();
    
    int count = 0;
    for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    }
    
    if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No");
  }
} Main public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    
    String S = stdIn.next();
    String T = stdIn.next();
    
    int count = 0;
    for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    }
    
    if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No");
  } main {
    Scanner stdIn = new Scanner(System.in);
    
    String S = stdIn.next();
    String T = stdIn.next();
    
    int count = 0;
    for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    }
    
    if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No");
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String S = stdIn.next(); S stdIn.next() stdIn.next stdIn String T = stdIn.next(); T stdIn.next() stdIn.next stdIn int count = 0; count 0 for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    } {
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    } if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break; S.charAt(i) == T.charAt(i) S.charAt(i) S.charAt S i T.charAt(i) T.charAt T i {
        count++;
      } count++ count break; if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No"); count == S.length() && S.length() + 1 == T.length() count == S.length() count S.length() S.length S S.length() + 1 == T.length() S.length() + 1 S.length() S.length S 1 T.length() T.length T System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    
    String S = stdIn.next();
    String T = stdIn.next();
    
    int count = 0;
    for(int i = 0;i < S.length();i++){
      if(S.charAt(i) == T.charAt(i)){
        count++;
      }
      else
        break;
    }
    
    if(count == S.length() && S.length() + 1 == T.length())
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}

      
    