import java.util.Scanner;

public class Main {
		public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
		public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	}
} Main public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String  s = scan.next(); s scan.next() scan.next scan String  t = scan.next(); t scan.next() scan.next scan String ans = "No"; ans "No" if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		} s.length() + 1 == t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		} if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			} s.equals(t.substring(0 ,s.length())) s.equals s t.substring(0 ,s.length()) t.substring t 0 s.length() s.length s {
				ans = "Yes";
			} ans = "Yes" ans "Yes" System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
		public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	}
} public class Main {
		public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
		public static void main (String args[]) throws Exception{
		Scanner scan = new Scanner(System.in);
		String  s = scan.next();
		String  t = scan.next();
		String ans = "No";

		if(s.length() + 1 == t.length() ) {
			if(s.equals(t.substring(0 ,s.length()))) {
				ans = "Yes";
			}
		}
		System.out.println(ans);
	}
}