import java.util.*;

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

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    } main {

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


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

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    }
} Main
import java.util.*;

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

        Scanner sc = new Scanner(System.in);
        String s = (sc.next());
        String t = (sc.next());
        String ans = "No";

        t = t.substring(0, t.length()-1);

        if (s.equals(t)) {
            ans = "Yes";
        }


        System.out.println(ans);
    }
}