
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S S T; T char a[] = new char[13]; a new char[13] 13 S = sc.next() S sc.next() sc.next sc T = sc.next() T sc.next() sc.next sc String B = T.substring(0, S.length()); B T.substring(0, S.length()) T.substring T 0 S.length() S.length S if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} S.equals(B) S.equals S B {
			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" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S, T;
		char a[] = new char[13];
		S = sc.next();
		T = sc.next();



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

		if(S.equals(B)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}


	}

}
