import java.util.*;
public class Main {
  public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  }
} Main public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  } main {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  } Scanner input = new Scanner(System.in); input new Scanner(System.in) String first = input.next(); first input.next() input.next input String second = input.next(); second input.next() input.next input int n = first.length(); n first.length() first.length first if (second.length() != n + 1) {
      System.out.println("No");
      return;
    } second.length() != n + 1 second.length() second.length second n + 1 n 1 {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    } !second.substring(0, n).equals(first) second.substring(0, n).equals(first) second.substring(0, n).equals second.substring(0, n) second.substring second 0 n first {
      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" String... args args public class Main {
  public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  }
} public class Main {
  public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  }
} Main
import java.util.*;
public class Main {
  public static void main(String... args) {
   	Scanner input = new Scanner(System.in);
  	String first = input.next();
    String second = input.next();
    
    int n = first.length();
    
    if (second.length() != n + 1) {
      System.out.println("No");
      return;
    }
    
    if (!second.substring(0, n).equals(first)) {
      System.out.println("No");
      return;
    }
    
    System.out.println("Yes");
  }
}