import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  }
} Main public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  } main {
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  } Scanner sc =  new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String t = sc.nextLine().substring(0,s.length()); t sc.nextLine().substring(0,s.length()) sc.nextLine().substring sc.nextLine() sc.nextLine sc 0 s.length() s.length s System.out.println(s.equals(t) ? "Yes" : "No") System.out.println System.out System System.out s.equals(t) ? "Yes" : "No" s.equals(t) s.equals s t "Yes" "No" String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  }
} Main
import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    String s = sc.nextLine();
    String t = sc.nextLine().substring(0,s.length());
    System.out.println(s.equals(t) ? "Yes" : "No");
  }
}