import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc String T = sc.nextLine(); T sc.nextLine() sc.nextLine sc if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		} S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}") S.matches("[a-z]{1,10}") S.matches S "[a-z]{1,10}" T.matches("[a-z]{1,}") T.matches T "[a-z]{1,}" {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			} T.length() == S.length() + 1 T.length() T.length T S.length() + 1 S.length() S.length S 1 {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				} T.substring(0,S.length()).equals(S) T.substring(0,S.length()).equals T.substring(0,S.length()) T.substring T 0 S.length() S.length S S {
					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" {
				System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		if (S.matches("[a-z]{1,10}") && T.matches("[a-z]{1,}")) {
			if (T.length() == S.length() + 1) {
				if (T.substring(0,S.length()).equals(S)) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			} else {
				System.out.println("No");
			}

		} else {
			System.out.println("No");
		}
		sc.close();
	}
}
