import java.util.Scanner;

public class Main{

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

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

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

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
      	String s = scn.next();
      	String t = scn.next();
      	if(s.length() == t.length() - 1){
        	if(s.equals(t.substring(0, s.length()))){
            	System.out.println("Yes");
            }else{
            	System.out.println("No");
            }
        }else{
        	System.out.println("No");
        }
	}
}