import java.util.Scanner;
public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  }
} import java.util.Scanner; Scanner java.util public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  }
} Main public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  } main {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String str1 = sc.next(); str1 sc.next() sc.next sc boolean b = false; b false for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    } char c = 'a'; char c = 'a'; c 'a' c <= 'z' c 'z' c++ c++ c {
      if((str+c).equals(str1))
      {
        b = true;
      }
    } {
      if((str+c).equals(str1))
      {
        b = true;
      }
    } if((str+c).equals(str1))
      {
        b = true;
      } (str+c).equals(str1) (str+c).equals (str+c) str c str1 {
        b = true;
      } b = true b true System.out.println(b?"Yes":"No") System.out.println System.out System System.out b?"Yes":"No" b "Yes" "No" String[] args args public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  }
} public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  }
} Main
import java.util.Scanner;
public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    String str1 = sc.next();
    boolean b = false;
    for(char c = 'a'; c <= 'z'; c++)
    {
      if((str+c).equals(str1))
      {
        b = true;
      }
    }
    System.out.println(b?"Yes":"No");
  }
}
