
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	} main {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.nextLine(); S scanner.nextLine() scanner.nextLine scanner String T = scanner.nextLine(); T scanner.nextLine() scanner.nextLine scanner String t = T.substring(0,S.length()); t T.substring(0,S.length()) T.substring T 0 S.length() S.length S if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} S.compareTo(t) == 0 S.compareTo(t) S.compareTo S t 0 {
			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" scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	}

} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		String T = scanner.nextLine();

		String t = T.substring(0,S.length());

		if(S.compareTo(t) == 0) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

		scanner.close();


	}

}
