import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} Main public static void main(String[] args) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    } main {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String[] str = new String[2]; str new String[2] 2 for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        } int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
		    str[i] = scan.nextLine();
        } {
		    str[i] = scan.nextLine();
        } str[i] = scan.nextLine() str[i] str i scan.nextLine() scan.nextLine scan if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } str[1].matches(str[0] + "\\w{1}") str[1].matches str[1] str 1 str[0] + "\\w{1}" str[0] str 0 "\\w{1}" {
            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) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner scan = new Scanner(System.in);
        String[] str = new String[2];
        
        for(int i = 0; i < str.length; i++){
		    str[i] = scan.nextLine();
        }
        
        if(str[1].matches(str[0] + "\\w{1}")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
}