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