import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    }
    public static void do_(Scanner inp) {
        String s = inp.next();
        String t = inp.next();
        if (s.length() + 1 == t.length()) {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        }
        else System.out.println("No");
    }
} import java.util.*; util.* java class Main {
    public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    }
    public static void do_(Scanner inp) {
        String s = inp.next();
        String t = inp.next();
        if (s.length() + 1 == t.length()) {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        }
        else System.out.println("No");
    }
} Main public static void main(String args[]) {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    } main {
        Scanner inp = new Scanner(System.in);
        do_(inp);
        inp.close();
    } Scanner inp = new Scanner(System.in); inp new Scanner(System.in) do_(inp) do_ inp inp.close() inp.close inp String args[] args public static void do_(Scanner inp) {
        String s = inp.next();
        String t = inp.next();
        if (s.length() + 1 == t.length()) {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        }
        else System.out.println("No");
    } do_ {
        String s = inp.next();
        String t = inp.next();
        if (s.length() + 1 == t.length()) {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        }
        else System.out.println("No");
    } String s = inp.next(); s inp.next() inp.next inp String t = inp.next(); t inp.next() inp.next inp if (s.length() + 1 == t.length()) {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        }
        else System.out.println("No"); s.length() + 1 == t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
            if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            }
        } if (s.equals(t.substring(0, s.length()))) {
                System.out.println("Yes");
            }
            else {
                System.out.println("No");
            } s.equals(t.substring(0, s.length())) s.equals s t.substring(0, s.length()) t.substring t 0 s.length() s.length s {
                System.out.println("Yes");
            } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
                System.out.println("No");
            } System.out.println("No") System.out.println System.out System System.out "No" System.out.println("No") System.out.println System.out System System.out "No" Scanner inp inp
import java.util.*;

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