import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String t = sc.next(); t sc.next() sc.next sc String st = t.substring(0,s.length()); st t.substring(0,s.length()) t.substring t 0 s.length() s.length s if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} s.matches(st) && s.length() + 1 == t.length() s.matches(st) s.matches s st s.length() + 1 == t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
			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" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = t.substring(0,s.length());
		if (s.matches(st) && s.length() + 1 == t.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}	
		sc.close();
	}

}