import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    }
    static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    }
    static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    }
} Main public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    } main {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    } PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); out new PrintWriter(new OutputStreamWriter(System.out)) InputReader in=new InputReader(System.in); in new InputReader(System.in) String s=in.next(); s in.next() in.next in String t=in.next(); t in.next() in.next in boolean flag=true; flag true for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=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))
                flag=false; if(s.charAt(i)!=t.charAt(i))
                flag=false; s.charAt(i)!=t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i flag=false flag false if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No"); flag&&t.length()-s.length()==1 flag t.length()-s.length()==1 t.length()-s.length() t.length() t.length t s.length() s.length s 1 out.println("Yes") out.println out "Yes" out.println("No") out.println out "No" out.flush() out.flush out String[] args args static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    } InputReader private BufferedReader in; in private StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        } InputReader {
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        } in = new BufferedReader(new InputStreamReader(stream),32768) in new BufferedReader(new InputStreamReader(stream),32768) tokenizer = null tokenizer null InputStream stream stream public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        } next {
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        } while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            } tokenizer==null || !tokenizer.hasMoreTokens() tokenizer==null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                tokenizer = new StringTokenizer(in.readLine());
            } tokenizer = new StringTokenizer(in.readLine()) tokenizer new StringTokenizer(in.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        } nextLong {
            String next = next();
            return Long.valueOf(next);
        } String next = next(); next next() next return Long.valueOf(next); Long.valueOf(next) Long.valueOf Long next public int nextInt() throws IOException{
            return Integer.valueOf(next());
        } nextInt {
            return Integer.valueOf(next());
        } return Integer.valueOf(next()); Integer.valueOf(next()) Integer.valueOf Integer next() next public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    }
    static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    }
    static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        InputReader in=new InputReader(System.in);
        String s=in.next();
        String t=in.next();
        boolean flag=true;
        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=t.charAt(i))
                flag=false;
            if(flag&&t.length()-s.length()==1)
                out.println("Yes");
            else
                out.println("No");
        out.flush();
    }
    static class InputReader{
        private BufferedReader in;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream){
            in = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }
        public String next() throws IOException{
            while(tokenizer==null || !tokenizer.hasMoreTokens()){
                tokenizer = new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        public Long nextLong() throws IOException {
            String next = next();
            return Long.valueOf(next);
        }
        public int nextInt() throws IOException{
            return Integer.valueOf(next());
        }
    }
}