import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	} main {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	} String S; S String T; T Scanner sc = new Scanner(System.in); sc new Scanner(System.in) S = sc.next() S sc.next() sc.next sc T = sc.next() T sc.next() sc.next sc if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes"); S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length() T.startsWith(S) == false S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length() S.length() < 1 S.length() S.length S 1 S.length() > 10 S.length() S.length S 10 T.startsWith(S) == false T.startsWith(S) T.startsWith T S false S.length() + 1 != T.length() S.length() + 1 S.length() S.length S 1 T.length() T.length T {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

	public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	}
} public class Main {

	public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String S;
		String T;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		T = sc.next();
		if (S.length() < 1 || S.length() > 10 || T.startsWith(S) == false || S.length() + 1 != T.length()) {
			System.out.println("No");
		} else
			System.out.println("Yes");
	}
}