import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			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) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	}
} Main public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	} main {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) String S = input.next(); S input.next() input.next input String T = input.next(); T input.next() input.next input input.close() input.close input if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		} S.length() + 1 == T.length() & T.startsWith(S) S.length() + 1 == T.length() S.length() + 1 S.length() S.length S 1 T.length() T.length T T.startsWith(S) T.startsWith T 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" String[] args args public class Main {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	}
} public class Main {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		String S = input.next();
		String T = input.next();

		input.close();

		if(S.length() + 1 == T.length() & T.startsWith(S)) {

			System.out.println("Yes");

		}else {

			System.out.println("No");

		}
	}
}
