import java.util.Scanner;

public class Main{
  static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
} import java.util.Scanner; Scanner java.util public class Main{
  static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
} Main static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  } main {
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String t = sc.nextLine(); t sc.nextLine() sc.nextLine sc int sLength = s.length(); sLength s.length() s.length s int tLength = t.length(); tLength t.length() t.length t if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    } (sLength+1) != tLength (sLength+1) sLength 1 tLength {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; if(sLength == 0){
      System.out.println("No");
      return;
    } sLength == 0 sLength 0 {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; int errFlag = 0; errFlag 0 for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    } int i=0; int i=0; i 0 i<sLength i sLength i++ i++ i {
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    } {
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    } if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      } s.charAt(i) != t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i {
        errFlag = 1;
      } errFlag = 1 errFlag 1 if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } errFlag == 0 errFlag 0 {
      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" String[] args args public class Main{
  static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
} public class Main{
  static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
} Main
import java.util.Scanner;

public class Main{
  static public void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.nextLine();
    String t = sc.nextLine();
    
    int sLength = s.length();
    int tLength = t.length();
    
    if((sLength+1) != tLength){
      System.out.println("No");
      return;
    }else if(sLength == 0){
      System.out.println("No");
      return;
    }
    
    int errFlag = 0;
    for(int i=0; i<sLength; i++){
      if(s.charAt(i) != t.charAt(i)){
        errFlag = 1;
      }
    }
    
    if(errFlag == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
}