import java.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) String s = sc.next(); s sc.next() sc.next sc String t = sc.next(); t sc.next() sc.next sc if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("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 {
            out.println("Yes");
        } out.println("Yes") out.println out "Yes" {
            out.println("No");
        } out.println("No") out.println out "No" out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        String s = sc.next();
        String t = sc.next();
        if (s.equals(t.substring(0, t.length() - 1))) {
            out.println("Yes");
        }
        else {
            out.println("No");
        }
        out.flush();
    }
} Main
import java.io.PrintWriter;
import java.util.*;

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