import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc String T = sc.nextLine(); T sc.nextLine() sc.nextLine sc boolean judge = true; judge true if(T.length() != S.length() + 1){
            judge = false;
        } T.length() != S.length() + 1 T.length() T.length T S.length() + 1 S.length() S.length S 1 {
            judge = false;
        } judge = false judge false for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        } 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)){
                judge = false;
                break;
            }
        } {
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        } if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            } S.charAt(i) != T.charAt(i) S.charAt(i) S.charAt S i T.charAt(i) T.charAt T i {
                judge = false;
                break;
            } judge = false judge false break; if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        } judge == false judge false {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            System.out.println("Yes");
        } 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 sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String T = sc.nextLine();
        boolean judge = true;
        if(T.length() != S.length() + 1){
            judge = false;
        }
        
        for(int i =0; i<S.length(); i++){
            if(S.charAt(i) != T.charAt(i)){
                judge = false;
                break;
            }
        }
        
        if(judge == false){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
    }
}