import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			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){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

		scan.close();
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.nextLine(); S scan.nextLine() scan.nextLine scan String T = scan.nextLine(); T scan.nextLine() scan.nextLine scan int amt = S.length(); amt S.length() S.length S String T_part = T.substring(0, amt); T_part T.substring(0, amt) T.substring T 0 amt if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} T_part.equals(S) && T.length() == (amt + 1) T_part.equals(S) T_part.equals T_part S T.length() == (amt + 1) T.length() T.length T (amt + 1) amt 1 {
			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){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

		scan.close();
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			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){
		Scanner scan = new Scanner(System.in);
		String S = scan.nextLine();
		String T = scan.nextLine();

		int amt = S.length();
		String T_part = T.substring(0, amt);

		if(T_part.equals(S) && T.length() == (amt + 1)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

		scan.close();
	}
}