import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			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 sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String id = sc.next(); id sc.next() sc.next sc String id2 = sc.next(); id2 sc.next() sc.next sc int cnt = id.length(); cnt id.length() id.length id int cnt2 = id2.length(); cnt2 id2.length() id2.length id2 String id3 = id2.substring(cnt); id3 id2.substring(cnt) id2.substring id2 cnt if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		} id.equals(id2.substring(0, cnt)) && id3.length() == 1 id.equals(id2.substring(0, cnt)) id.equals id id2.substring(0, cnt) id2.substring id2 0 cnt id3.length() == 1 id3.length() id3.length id3 1 {
			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 sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String id = sc.next(); //ID
		String id2 = sc.next(); //ID

		int cnt = id.length();
		int cnt2 = id2.length();

		String id3 = id2.substring(cnt);

		if(id.equals(id2.substring(0, cnt)) && id3.length() == 1) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	}

}
