import java.util.Scanner;

public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }

} import java.util.Scanner; Scanner java.util public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }

} Main /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  } main {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) String  S   = cin.next(); S cin.next() cin.next cin String  T   = cin.next(); T cin.next() cin.next cin if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    } (T.length() - S.length()) != 1 (T.length() - S.length()) T.length() T.length T S.length() S.length S 1 {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" {
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    } if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      } T.indexOf(S) == 0 T.indexOf(S) T.indexOf T S 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 {

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }

} public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }

} Main
import java.util.Scanner;

public class Main {

  /**
   * @param args
   */
  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner cin = new Scanner(System.in);
    String  S   = cin.next();
    String  T   = cin.next();
    if ((T.length() - S.length()) != 1){
      System.out.println("No");
    }
    else{
      if (T.indexOf(S) == 0){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
    }
  }

}
