import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    }
} Main public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    } main {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan String str2 = scan.nextLine(); str2 scan.nextLine() scan.nextLine scan String c = str2.substring(0, str.length()); c str2.substring(0, str.length()) str2.substring str2 0 str.length() str.length str if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } str.equals(c) str.equals str c {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" scan.close() scan.close scan String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        String str2 = scan.nextLine();

        String c = str2.substring(0, str.length());


        if (str.equals(c)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        scan.close();
    }
}