import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    }
}








 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    } main {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String a = in.next(); a in.next() in.next in String f = in.next(); f in.next() in.next in int t = a.length(); t a.length() a.length a int k = f.length(); k f.length() f.length f int h = 0; h 0 for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        } int i = 0; int i = 0; i 0 i < t i t i++ i++ i {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        } {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        } if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            } a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0) a.charAt(i) == f.charAt(i) a.charAt(i) a.charAt a i f.charAt(i) f.charAt f i (t - (k - 1) == 0) t - (k - 1) t (k - 1) k 1 0 {
                h++;
            } h++ h if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        } h == t h t {
            System.out.print("Yes");
        } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
            System.out.print("No");
        } System.out.print("No") System.out.print System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String f = in.next();
        int t = a.length();
        int k = f.length();
        int h = 0;

        for (int i = 0; i < t; i++) {
            if (a.charAt(i) == f.charAt(i) && (t - (k - 1) == 0)) {
                h++;
            }


        }


        if (h == t) {
            System.out.print("Yes");
        } else {
            System.out.print("No");
        }

    }
}









