
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    }
} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    } Scanner scan = new Scanner(is); scan new Scanner(is) String s = scan.next(); s scan.next() scan.next scan String t = scan.next(); t scan.next() scan.next scan String sub = t.substring(0, t.length()-1); sub t.substring(0, t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No"); s.equals(sub) s.equals s sub os.println("Yes") os.println os "Yes" os.println("No") os.println os "No" InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    }
} Main

import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String s = scan.next();
        String t = scan.next();

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

        if(s.equals(sub))
            os.println("Yes");
        else
            os.println("No");
    }
}