import java.io.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    }
} import java.io.*; io.* java public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    } main {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    } BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in)); reader new BufferedReader (new InputStreamReader (System.in)) String S = reader.readLine(); S reader.readLine() reader.readLine reader String T = reader.readLine(); T reader.readLine() reader.readLine reader System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No") System.out.println System.out System System.out S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No" 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 "Yes" "No" return; String[] args args public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    }
} public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    }
} Main
import java.io.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String S = reader.readLine();
        String T = reader.readLine();
        System.out.println (S.equals (T.substring (0, T.length() - 1)) ? "Yes"
                                                                       : "No");
        return;
    }
}