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