import java.util.Scanner;

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

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