import java.util.Scanner;

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

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