import java.util.StringJoiner;
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
}
} import java.util.StringJoiner; StringJoiner java.util import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
}
} Main public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
} main {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String line2 = sc.nextLine(); line2 sc.nextLine() sc.nextLine sc String column[] = line2.split(""); column line2.split("") line2.split line2 "" String addword = column[line2.length() -1]; addword column[line2.length() -1] column line2.length() -1 line2.length() line2.length line2 1 String newID = String.join("" , line , addword); newID String.join("" , line , addword) String.join String "" line addword if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
} line2.equals(newID) line2.equals line2 newID {
  System.out.println("Yes");
} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
  System.out.println("No");
} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
  public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
}
} public class Main{
  public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
}
} Main
import java.util.StringJoiner;
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();

String line2 = sc.nextLine();
String column[] = line2.split("");
String addword = column[line2.length() -1];
String newID = String.join("" , line , addword);

if(line2.equals(newID)){
  System.out.println("Yes");
}else{
  System.out.println("No");
}

  
}
}