import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    } main {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        } s.length() >= 1 && s.length() <= 10 s.length() >= 1 s.length() s.length s 1 s.length() <= 10 s.length() s.length s 10 {
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        } String t = scan.next(); t scan.next() scan.next scan char[] x = new char[s.length()]; x new char[s.length()] s.length() s.length s for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            } int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                x[i] = s.charAt(i);
            } {
                x[i] = s.charAt(i);
            } x[i] = s.charAt(i) x[i] x i s.charAt(i) s.charAt s i char[] y = new char[t.length()]; y new char[t.length()] t.length() t.length t for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            } int i = 0 ; int i = 0 ; i 0 i < t.length() i t.length() t.length t i++ i++ i {
                y[i] = t.charAt(i);
            } {
                y[i] = t.charAt(i);
            } y[i] = t.charAt(i) y[i] y i t.charAt(i) t.charAt t i String out = "Yes"; out "Yes" if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            } (s.length() + 1) == t.length() (s.length() + 1) s.length() s.length s 1 t.length() t.length t {
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            } for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                } int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                } {
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                } if(x[i] != y[i]){
                        out = "No";
                        break;
                    } x[i] != y[i] x[i] x i y[i] y i {
                        out = "No";
                        break;
                    } out = "No" out "No" break; System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        if(s.length() >= 1 && s.length() <= 10){
            String t = scan.next();

            char[] x = new char[s.length()];
            for(int i = 0 ; i < s.length() ; i++){
                x[i] = s.charAt(i);
            }
            char[] y = new char[t.length()];
            for(int i = 0 ; i < t.length() ; i++){
                y[i] = t.charAt(i);
            }

            String out = "Yes";

            if((s.length() + 1) == t.length()){
                for(int i = 0 ; i < s.length() ; i++){
                    if(x[i] != y[i]){
                        out = "No";
                        break;
                    }
                }
                System.out.println(out);
            }
        }
    }
}
