
import java.util.*;
import java.io.*;

import static java.lang.Character.isUpperCase;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    }







    }


 import java.util.*; util.* java import java.io.*; io.* java import static java.lang.Character.isUpperCase; import static java.lang.Character.isUpperCase; import static java.lang.Character.isUpperCase; public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    }







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

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    } main {

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String str = in.next(); str in.next() in.next in String sc = in.next(); sc in.next() in.next in int a = sc.length()-1; a sc.length()-1 sc.length() sc.length sc 1 str =  str + sc.charAt(a) str str + sc.charAt(a) str sc.charAt(a) sc.charAt sc a if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            } str.equals(sc) str.equals str sc {
            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 in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    }







    } public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    }







    } Main

import java.util.*;
import java.io.*;

import static java.lang.Character.isUpperCase;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String str = in.next();
        String sc = in.next();


        int a = sc.length()-1;


        str =  str + sc.charAt(a);


        if(str.equals(sc))
        {
            System.out.println("Yes");

        }
        else
            {
                System.out.println("No");
            }
    }







    }



