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