import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String t = sc.nextLine(); t sc.nextLine() sc.nextLine sc String[] array_s = s.split(""); array_s s.split("") s.split s "" String[] array_t = t.split(""); array_t t.split("") t.split t "" if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        } array_s.length + 1 != array_t.length array_s.length + 1 array_s.length array_s array_s.length 1 array_t.length array_t array_t.length {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < array_s.length i array_s.length array_s array_s.length i++ i++ i {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        } {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        } if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            } !array_s[i].equals(array_t[i]) array_s[i].equals(array_t[i]) array_s[i].equals array_s[i] array_s i array_t[i] array_t i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; 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 sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 入力
        String s = sc.nextLine();
        String t = sc.nextLine();

        // 出力
        String[] array_s = s.split("");
        String[] array_t = t.split("");
        if (array_s.length + 1 != array_t.length) {
            System.out.println("No");
            return;
        }
        for (int i = 0; i < array_s.length; i++) {
            if (!array_s[i].equals(array_t[i])) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
}
