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