import java.util.Scanner;

public class Main {

    static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util public class Main {

    static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    }
} Main static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    } test {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    } if (t.length() != s.length() + 1) {
            return false;
        } t.length() != s.length() + 1 t.length() t.length t s.length() + 1 s.length() s.length s 1 {
            return false;
        } return false; false for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        } {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        } if (s.charAt(i) != t.charAt(i)) {
                return false;
            } s.charAt(i) != t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i {
                return false;
            } return false; false return true; true String s s String t t public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    } main {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next() s in.next() in.next in t = in.next(); t in.next() in.next in System.out.println(test(s, t) ? "Yes" : "No") System.out.println System.out System System.out test(s, t) ? "Yes" : "No" test(s, t) test s t "Yes" "No" String[] args args public class Main {

    static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    }
} public class Main {

    static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

public class Main {

    static boolean test(String s, String t) {
        if (t.length() != s.length() + 1) {
            return false;
        }
        for (int i=0;i<s.length();i++) {
            if (s.charAt(i) != t.charAt(i)) {
                return false;
            }
        }

        return true;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), t = in.next();
        System.out.println(test(s, t) ? "Yes" : "No");
    }
}
