import java.io.*;
import java.util.*;
public class Main {
    static PrintWriter pw;
    static int[] visit;
    static int max;
    static int[] arr;
    static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    }
    static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    }
    static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    }
    public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
    static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    static PrintWriter pw;
    static int[] visit;
    static int max;
    static int[] arr;
    static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    }
    static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    }
    static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    }
    public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
    static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    }
} Main static PrintWriter pw; pw static int[] visit; visit static int max; max static int[] arr; arr static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    } dfs {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    } visit[i-1]=c visit[i-1] visit i-1 i 1 c max=Math.max(c, max) max Math.max(c, max) Math.max Math c max int lim=arr.length/i; lim arr.length/i arr.length arr arr.length i for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       } int j=2; int j=2; j 2 j<=lim j lim j++ j++ j {
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       } {
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       } if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           } visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1] visit[i*j-1]<c+1 visit[i*j-1] visit i*j-1 i*j i j 1 c+1 c 1 arr[i*j-1]>arr[i-1] arr[i*j-1] arr i*j-1 i*j i j 1 arr[i-1] arr i-1 i 1 {
               dfs(i*j, c+1);
           } dfs(i*j, c+1) dfs i*j i j c+1 c 1 int i i int c c public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    } gcf {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    } while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        } x%y!=0 && y%x!=0 x%y!=0 x%y x y 0 y%x!=0 y%x y x 0 {
            if(x>y)
                x%=y;
            else
                y%=x;
        } if(x>y)
                x%=y;
            else
                y%=x; x>y x y x%=y x y y%=x y x return x>y? y:x; x>y? y:x x>y x y y x long x x long y y static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    } ceildiv {
        return x%y==0? x/y: x/y+1;
    } return x%y==0? x/y: x/y+1; x%y==0? x/y: x/y+1 x%y==0 x%y x y 0 x/y x y x/y+1 x/y x y 1 int x x int y y static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    } count1s {
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    } int ans=0; ans 0 while(x>0){
            ans+=(x&1);
            x>>=1;
        } x>0 x 0 {
            ans+=(x&1);
            x>>=1;
        } ans+=(x&1) ans (x&1) x 1 x>>=1 x 1 return ans; ans int x x static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    } print {
        while(n-->0)
            pw.print(0+" ");
    } while(n-->0)
            pw.print(0+" "); n-->0 n-- n 0 pw.print(0+" ") pw.print pw 0+" " 0 " " int n n static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    } binary {
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    } for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return 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)>'1')
                return false; if(s.charAt(i)>'1')
                return false; s.charAt(i)>'1' s.charAt(i) s.charAt s i '1' return false; false return true; true String s s public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    } main {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    } Scanner sc= new Scanner(System.in); sc new Scanner(System.in) pw = new PrintWriter(System.out) pw new PrintWriter(System.out) String s=sc.next() s sc.next() sc.next sc t=sc.next(); t sc.next() sc.next sc if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        } s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s) s.length()==t.length()-1 s.length() s.length s t.length()-1 t.length() t.length t 1 t.substring(0, t.length()-1).equals(s) t.substring(0, t.length()-1).equals t.substring(0, t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 s {
            pw.println("Yes");
        } pw.println("Yes") pw.println pw "Yes" {
            pw.println("No");
        } pw.println("No") pw.println pw "No" pw.close() pw.close pw String[] args args static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    } Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        } Scanner {
            br = new BufferedReader(new InputStreamReader(s));
        } br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public Scanner(FileReader r) {
            br = new BufferedReader(r);
        } Scanner {
            br = new BufferedReader(r);
        } br = new BufferedReader(r) br new BufferedReader(r) FileReader r r public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {
            return br.readLine();
        } nextLine {
            return br.readLine();
        } return br.readLine(); br.readLine() br.readLine br public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        } nextArr {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        } int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt(); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i arr[i] = nextInt(); arr[i] = nextInt() arr[i] arr i nextInt() nextInt return arr; arr int n n public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        } nextsort {
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        } Integer[] arr=new Integer[n]; arr new Integer[n] n for(int i=0; i<n; i++)
                arr[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i arr[i]=nextInt(); arr[i]=nextInt() arr[i] arr i nextInt() nextInt return arr; arr int n n public boolean ready() throws IOException {
            return br.ready();
        } ready {
            return br.ready();
        } return br.ready(); br.ready() br.ready br static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    } Pair int x; x int y; y public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        } Pair {
            this.x=x;
            this.y=y;
        } this.x=x this.x this this.x x this.y=y this.y this this.y y int x x int y y public int hashCode() {
            return (this.x+""+this.y).hashCode();
        } hashCode {
            return (this.x+""+this.y).hashCode();
        } return (this.x+""+this.y).hashCode(); (this.x+""+this.y).hashCode() (this.x+""+this.y).hashCode (this.x+""+this.y) this.x+""+this.y this.x this this.x "" this.y this this.y public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        } compareTo {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        } if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            } this.x!=other.x this.x this this.x other.x other other.x return this.x-other.x; this.x-other.x this.x this this.x other.x other other.x {
                return this.y-other.y;
            } return this.y-other.y; this.y-other.y this.y this this.y other.y other other.y Pair other other public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        } equals {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        } if (obj == null) {
                return false;
            } obj == null obj null {
                return false;
            } return false; false if (this.getClass() != obj.getClass()) {
                return false;
            } this.getClass() != obj.getClass() this.getClass() this.getClass this obj.getClass() obj.getClass obj {
                return false;
            } return false; false Pair p = (Pair) obj; p (Pair) obj return this.x == p.x && this.y == p.y; this.x == p.x && this.y == p.y this.x == p.x this.x this this.x p.x p p.x this.y == p.y this.y this this.y p.y p p.y Object obj obj Comparable static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    } tuple int x; x int y; y int z; z public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        } tuple {
            this.x=x;
            this.y=y;
            this.z=z;
        } this.x=x this.x this this.x x this.y=y this.y this this.y y this.z=z this.z this this.z z int x x int y y int z z public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        } compareTo {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        } if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            } this.x!=other.x this.x this this.x other.x other other.x return this.x-other.x; this.x-other.x this.x this this.x other.x other other.x {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            } if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z; this.y!=other.y this.y this this.y other.y other other.y return this.y-other.y; this.y-other.y this.y this this.y other.y other other.y return this.z-other.z; this.z-other.z this.z this this.z other.z other other.z tuple other other public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        } equal {
            return this.x==t.x && this.y==t.y;
        } return this.x==t.x && this.y==t.y; this.x==t.x && this.y==t.y this.x==t.x this.x this this.x t.x t t.x this.y==t.y this.y this this.y t.y t t.y tuple t t Comparable static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    } visit int x; x boolean y; y public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        } visit {
            this.x=x;
            this.y=y;
        } this.x=x this.x this this.x x this.y=y this.y this this.y y int x x boolean y y public class Main {
    static PrintWriter pw;
    static int[] visit;
    static int max;
    static int[] arr;
    static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    }
    static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    }
    static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    }
    public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
    static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    }
} public class Main {
    static PrintWriter pw;
    static int[] visit;
    static int max;
    static int[] arr;
    static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    }
    static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    }
    static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    }
    public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
    static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    static PrintWriter pw;
    static int[] visit;
    static int max;
    static int[] arr;
    static void dfs(int i, int c) {
       visit[i-1]=c;
       max=Math.max(c, max);
       int lim=arr.length/i;
       for(int j=2; j<=lim; j++){
           if(visit[i*j-1]<c+1 && arr[i*j-1]>arr[i-1]){
               dfs(i*j, c+1);
           }
       }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static int count1s(int x){
        int ans=0;
        while(x>0){
            ans+=(x&1);
            x>>=1;
        }
        return ans;
    }
    static void print(int n){
        while(n-->0)
            pw.print(0+" ");
    }
    static boolean binary(String s){
        for(int i=0; i<s.length(); i++)
            if(s.charAt(i)>'1')
                return false;
            return true;
    }
    public static void main(String[] args) throws Exception {
        Scanner sc= new Scanner(System.in);
        pw = new PrintWriter(System.out);
        String s=sc.next(),t=sc.next();
        if(s.length()==t.length()-1 && t.substring(0, t.length()-1).equals(s)){
            pw.println("Yes");
        }else{
            pw.println("No");
        }
        pw.close();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x+""+this.y).hashCode();
        }
        public int compareTo(Pair other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                return this.y-other.y;
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x && this.y == p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
    static class visit {
        int x;
        boolean y;
        public visit(int x, boolean y){
            this.x=x;
            this.y=y;
        }
    }
}