import java.io.*;
public class Main {
public static void main (String[]args) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       }
   } import java.io.*; io.* java public class Main {
public static void main (String[]args) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       }
   } Main public static void main (String[]args) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       } main {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       } catch (Exception e) {
       } Exception e {
       } {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    } String s = br.readLine(); s br.readLine() br.readLine br String t = br.readLine(); t br.readLine() br.readLine br if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 } (t.substring(0,t.length()-1).equals(s)) t.substring(0,t.length()-1).equals t.substring(0,t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 s {
    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) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       }
   } public class Main {
public static void main (String[]args) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       }
   } Main
import java.io.*;
public class Main {
public static void main (String[]args) {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try {
 String s = br.readLine();
 String t = br.readLine();
 if((t.substring(0,t.length()-1).equals(s))) {
    System.out.println("Yes");
 }
 else{
    System.out.println("No");
 }

    }catch (Exception e) {
       }
       }
   }