import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    }

    private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    }

    private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    }

    private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    }

    private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    }

    private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
    }




    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    }

}

/**
 * 7 3
 * 3 1 5
 * 9 6 5
 *
 * i = 1: 1
 * i = 2: 2
 * i = 3: 3
 *
 *
 * 1 2 3 3 3 3 3
 */


/**
 *
 *  1+1
 **/ import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.io.*; io.* java public class Main {

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    }

    private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    }

    private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    }

    private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    }

    private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    }

    private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
    }




    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    }

} Main public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    } main {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    } FastReader sc = new FastReader(); sc new FastReader() String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String t = sc.nextLine(); t sc.nextLine() sc.nextLine sc if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        } !t.substring(0, t.length()-1).equals(s) 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 {
            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 private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    } prefix_function {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    } int n = s.length(); n s.length() s.length s int[] res = new int[n]; res new int[n] n for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        } {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        } int j = res[i-1]; j res[i-1] res i-1 i 1 while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            } j > 0 && s.charAt(i) != s.charAt(j) j > 0 j 0 s.charAt(i) != s.charAt(j) s.charAt(i) s.charAt s i s.charAt(j) s.charAt s j {
                j = res[j-1];
            } j = res[j-1] j res[j-1] res j-1 j 1 if (s.charAt(i)==s.charAt(j)) {
                j++;
            } s.charAt(i)==s.charAt(j) s.charAt(i) s.charAt s i s.charAt(j) s.charAt s j {
                j++;
            } j++ j res[i] = j res[i] res i j return res; res String s s private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    } check {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    } char cc = s.charAt(0); cc s.charAt(0) s.charAt s 0 for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        } char c s.toCharArray() s.toCharArray s {
            if (c!=cc) return false;
        } {
            if (c!=cc) return false;
        } if (c!=cc) return false; c!=cc c cc return false; false return true; true String s s private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    } isPrime {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    } for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        } int i = 2; int i = 2; i 2 i <= (int)Math.sqrt(num) i (int)Math.sqrt(num) Math.sqrt Math num i++ i++ i {
            if (num % i == 0) return new int[]{i, num/i};
        } {
            if (num % i == 0) return new int[]{i, num/i};
        } if (num % i == 0) return new int[]{i, num/i}; num % i == 0 num % i num i 0 return new int[]{i, num/i}; new int[]{i, num/i} return null; null int num num private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    } sign {
        if (num < 0) return -1;
        return 1;
    } if (num < 0) return -1; num < 0 num 0 return -1; -1 1 return 1; 1 long num num private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=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 static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } FastReader {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } br = new BufferedReader(new
                    InputStreamReader(System.in)) br new BufferedReader(new
                    InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    }

    private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    }

    private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    }

    private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    }

    private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    }

    private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
    }




    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    }

} public class Main {

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    }

    private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    }

    private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    }

    private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    }

    private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    }

    private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
    }




    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    }

} Main
import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        FastReader sc = new FastReader();
        String s = sc.nextLine();
        String t = sc.nextLine();
        if (!t.substring(0, t.length()-1).equals(s)) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
        //x+a*t == y - b * t
        //a*t+b*t == y - x
        //(a+b)*t == y - x
        // a + (a*2(k-1) = n*2/k
        // a+(a+2k-2)=2a+2k-2=n*2/k
    }

    private static int[] prefix_function(String s) {
        int n = s.length();
        int[] res = new int[n];
        for (int i = 1; i < n; i++) {
            int j = res[i-1];
            while (j > 0 && s.charAt(i) != s.charAt(j)) {
                j = res[j-1];
            }
            if (s.charAt(i)==s.charAt(j)) {
                j++;
            }
            res[i] = j;
        }
        return res;
    }

    private static boolean check(String s) {
        char cc = s.charAt(0);
        for (char c : s.toCharArray()) {
            if (c!=cc) return false;
        }
        return true;
    }

    private static int[] isPrime(int num) {
        for (int i = 2; i <= (int)Math.sqrt(num); i++) {
            if (num % i == 0) return new int[]{i, num/i};
        }
        return null;
    }

    private static int sign(long num) {
        if (num < 0) return -1;
        return 1;
    }

    private static class Pair {
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
    }




    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }


    }

}

/**
 * 7 3
 * 3 1 5
 * 9 6 5
 *
 * i = 1: 1
 * i = 2: 2
 * i = 3: 3
 *
 *
 * 1 2 3 3 3 3 3
 */


/**
 *
 *  1+1
 **/