import java.util.Scanner;

public class Main{
    public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    }
  } import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    }
  } Main public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    } main {

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.nextLine(); s scan.nextLine() scan.nextLine scan String t = scan.nextLine(); t scan.nextLine() scan.nextLine scan String tt = t.substring(0, t.length()-1); tt t.substring(0, t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      } (s.length() == t.length() -1) && (s.equals(tt)) (s.length() == t.length() -1) s.length() s.length s t.length() -1 t.length() t.length t 1 (s.equals(tt)) s.equals s tt {
          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" scan.close() scan.close scan String args[] args public class Main{
    public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    }
  } public class Main{
    public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    }
  } Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){

    Scanner scan = new Scanner(System.in);

    String s = scan.nextLine();
    String t = scan.nextLine();

      
    String tt = t.substring(0, t.length()-1);

    
      
  
      if ( (s.length() == t.length() -1) && (s.equals(tt)) ){
          System.out.println("Yes");
      } else {
          System.out.println("No");
      }

      scan.close();
    }
  }