import java.util.*;
class Main{
    public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String check = scanner.nextLine();

        if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String check = scanner.nextLine();

        if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String check = scanner.nextLine();

        if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
      Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String check = scanner.nextLine();

        if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String check = scanner.nextLine(); check scanner.nextLine() scanner.nextLine scanner if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } check.matches(input + "[a-z]") check.matches check input + "[a-z]" input "[a-z]" {
            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
import java.util.*;
class Main{
    public static void main(String args[]){
      Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        String check = scanner.nextLine();

        if (check.matches(input + "[a-z]")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
