import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	}
} Main public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	} main {
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String S = stdIn.next(); S stdIn.next() stdIn.next stdIn String T = stdIn.next(); T stdIn.next() stdIn.next stdIn if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		} S.equals(T.substring(0,S.length())) S.equals S T.substring(0,S.length()) T.substring T 0 S.length() S.length S {
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		} if(S.length() == T.length() - 1){
				System.out.println("Yes");
			} S.length() == T.length() - 1 S.length() S.length S T.length() - 1 T.length() T.length T 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" stdIn.close() stdIn.close stdIn String[] args args public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		String T = stdIn.next();
		if(S.equals(T.substring(0,S.length()))){
			if(S.length() == T.length() - 1){
				System.out.println("Yes");
			}
		}
		else{
			System.out.println("No");
		}
		stdIn.close();
	}
}