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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1); t2 t.substring(0, t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 if (s.length()== t.length()-1 && s.equals(t2)) {
			System.out.println("Yes");}
		else {
			System.out.println("No");
		} s.length()== t.length()-1 && s.equals(t2) s.length()== t.length()-1 s.length() s.length s t.length()-1 t.length() t.length t 1 s.equals(t2) s.equals s t2 {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			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 t2 = t.substring(0, t.length()-1);
		if (s.length()== t.length()-1 && s.equals(t2)) {
			System.out.println("Yes");}
		else {
			System.out.println("No");
		}
	}
}