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