
import java.util.*;


 public class Main{

	public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	}

} import java.util.*; util.* java public class Main{

	public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	}

} Main public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	} main {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc String x=sc.nextLine(); x sc.nextLine() sc.nextLine sc int n=x.length(); n x.length() x.length x String r=x.substring(0,n-1); r x.substring(0,n-1) x.substring x 0 n-1 n 1 if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");} r.equals(s) r.equals r s {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" sc.close() sc.close sc String[] args args public class Main{

	public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	}

} public class Main{

	public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	}

} Main

import java.util.*;


 public class Main{

	public static void main(String[] args) {
	
		
		Scanner sc=new Scanner(System.in);
		
		String s=sc.nextLine();
		String x=sc.nextLine();
		int n=x.length();
	
		String r=x.substring(0,n-1);
		
		
		if(r.equals(s))
		{System.out.println("Yes");}
		else
		{System.out.println("No");}
		
		sc.close();

	}

}
