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