import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    } BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); br new BufferedReader(new java.io.InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) String S = br.readLine(); S br.readLine() br.readLine br String T = br.readLine(); T br.readLine() br.readLine br String tmp = T.substring(T.length() - 1, T.length()); tmp T.substring(T.length() - 1, T.length()) T.substring T T.length() - 1 T.length() T.length T 1 T.length() T.length T if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        } T.equals(S.concat(tmp)) T.equals T S.concat(tmp) S.concat S tmp {
            pw.println("Yes");
        } pw.println("Yes") pw.println pw "Yes" {
            pw.println("No");
        } pw.println("No") pw.println pw "No" br.close() br.close br pw.close() pw.close pw String[] args args public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    }
} public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        
        String S = br.readLine();
        String T = br.readLine();

        String tmp = T.substring(T.length() - 1, T.length());

        if(T.equals(S.concat(tmp))) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        br.close();
        pw.close();
    }
}