import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    } main {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String S = s.next(); S s.next() s.next s String T = s.next(); T s.next() s.next s char[] sc = S.toCharArray(); sc S.toCharArray() S.toCharArray S char[] tc = T.toCharArray(); tc T.toCharArray() T.toCharArray T if((tc.length - sc.length) > 1) {
            System.out.println("No");
        } (tc.length - sc.length) > 1 (tc.length - sc.length) tc.length tc tc.length sc.length sc sc.length 1 {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        } int i = 0; int i = 0; i 0 i < tc.length i tc.length tc tc.length i++ i++ i {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        } {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        } if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            } i < sc.length && sc[i] != tc[i] i < sc.length i sc.length sc sc.length sc[i] != tc[i] sc[i] sc i tc[i] tc i {
                System.out.println("No");
                break;
            } System.out.println("No") System.out.println System.out System System.out "No" break; if(i == tc.length-1) {
                System.out.println("Yes");
            } i == tc.length-1 i tc.length-1 tc.length tc tc.length 1 {
                System.out.println("Yes");
            } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String S = s.next();
        String T = s.next();
        char[] sc = S.toCharArray();
        char[] tc = T.toCharArray();

        if((tc.length - sc.length) > 1) {
            System.out.println("No");
        }

        // char[] ns = new char[sc.length+1];

        for (int i = 0; i < tc.length; i++) {
            if(i < sc.length && sc[i] != tc[i]){
                System.out.println("No");
                break;
            }

            if(i == tc.length-1) {
                System.out.println("Yes");
            }
        }

    }
}