import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner String t = scanner.next(); t scanner.next() scanner.next scanner if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        } s.equals(t.substring(0, t.length() - 1)) s.equals s t.substring(0, t.length() - 1) t.substring t 0 t.length() - 1 t.length() t.length t 1 {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        } if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            } s.length() + 1 == t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
                System.out.println("Yes");
                return;
            } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; 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 scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            if (s.length() + 1 == t.length()) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

        /*
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        long c = scanner.nextInt();
        long k = scanner.nextInt();
        if (a + b >= k) {
            System.out.println(a);
        }else {
            System.out.println(a - (k - (a + b)));
        }

         */
    }
}
