
import java.util.*;

public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    }
} Main public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    } main {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String s = sc.next(); s sc.next() sc.next sc final String t = sc.next(); t sc.next() sc.next sc sc.close() sc.close sc String result = "No"; result "No" if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        } t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s) t.length() == s.length() + 1 t.length() t.length t s.length() + 1 s.length() s.length s 1 t.substring(0, s.length()).equals(s) t.substring(0, s.length()).equals t.substring(0, s.length()) t.substring t 0 s.length() s.length s s {
            result = "Yes";
        } result = "Yes" result "Yes" System.out.println(result) System.out.println System.out System System.out result final String[] args args public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    }
} public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    }
} Main

import java.util.*;

public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final String s = sc.next();
        final String t = sc.next();
        sc.close();
        String result = "No";

        if (t.length() == s.length() + 1 && t.substring(0, s.length()).equals(s)) {
            result = "Yes";
        }

        System.out.println(result);
    }
}
