import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner String t = scanner.next(); t scanner.next() scanner.next scanner if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        } s.length() + 1 != t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if(!t.startsWith(s)){
            System.out.println("No");
            return;
        } !t.startsWith(s) t.startsWith(s) t.startsWith t s {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();

        if(s.length() + 1 != t.length()){
            System.out.println("No");
            return;
        }
        if(!t.startsWith(s)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
}