import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Mehvix
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) abc167_a solver = new abc167_a(); solver new abc167_a() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    } abc167_a public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        } solve {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        } String s = fin.next(); s fin.next() fin.next fin String t = fin.next(); t fin.next() fin.next fin if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            } t.substring(0, t.length() - 1).equals(s) t.substring(0, t.length() - 1).equals t.substring(0, t.length() - 1) t.substring t 0 t.length() - 1 t.length() t.length t 1 s {
                fout.println("Yes");
            } fout.println("Yes") fout.println fout "Yes" {
                fout.println("No");
            } fout.println("No") fout.println fout "No" int testNumber testNumber Scanner fin fin PrintWriter fout fout public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Mehvix
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc167_a solver = new abc167_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc167_a {
        public void solve(int testNumber, Scanner fin, PrintWriter fout) {
            String s = fin.next();
            String t = fin.next();


            if (t.substring(0, t.length() - 1).equals(s)) {
                fout.println("Yes");
            } else {
                fout.println("No");
            }
        }

    }
}

