import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] c1 = s.toCharArray(); c1 s.toCharArray() s.toCharArray s String t = sc.next(); t sc.next() sc.next sc char[] c2 = t.toCharArray(); c2 t.toCharArray() t.toCharArray t if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    } c1.length+1 == c2.length c1.length+1 c1.length c1 c1.length 1 c2.length c2 c2.length {
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    } for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      } int i=0; int i=0; i 0 i<c1.length i c1.length c1 c1.length i++ i++ i {
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      } {
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      } if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        } c1[i]!=c2[i] c1[i] c1 i c2[i] c2 i {
          System.out.println("No");
          return ;
        } System.out.println("No") System.out.println System.out System System.out "No" return ; System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c1 = s.toCharArray();
    String t = sc.next();
    char[] c2 = t.toCharArray();

    if(c1.length+1 == c2.length){
      for(int i=0; i<c1.length; i++){
        if(c1[i]!=c2[i]){
          System.out.println("No");
          return ;
        }  
      }
      System.out.println("Yes");
      return;
    }

    System.out.println("No");

  }
}
