import java.lang.System.*;
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  }
}
 import java.lang.System.*; System.* java.lang import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  }
} Main public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  } main {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  } Scanner S = new Scanner(System.in); S new Scanner(System.in) String s = S.nextLine(); s S.nextLine() S.nextLine S String t = S.nextLine(); t S.nextLine() S.nextLine S String p = t.replaceFirst(".$", ""); p t.replaceFirst(".$", "") t.replaceFirst t ".$" "" if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      } s.equals(p) s.equals s p {
        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 {
  public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  }
} Main
import java.lang.System.*;
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner S = new Scanner(System.in);
    String s = S.nextLine();
    String t = S.nextLine();

    String p = t.replaceFirst(".$", "");
     if (s.equals(p)) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
  }
}

