import java.util.Scanner;

class Main {
  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {
    StringBuilder s = new StringBuilder(sc.next());
    StringBuilder t = new StringBuilder(sc.next());
    int len = t.length();
    t = t.deleteCharAt(len - 1);
    String ss = s.toString();
    String tt = t.toString();
    if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} import java.util.Scanner; Scanner java.util class Main {
  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {
    StringBuilder s = new StringBuilder(sc.next());
    StringBuilder t = new StringBuilder(sc.next());
    int len = t.length();
    t = t.deleteCharAt(len - 1);
    String ss = s.toString();
    String tt = t.toString();
    if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
    StringBuilder s = new StringBuilder(sc.next());
    StringBuilder t = new StringBuilder(sc.next());
    int len = t.length();
    t = t.deleteCharAt(len - 1);
    String ss = s.toString();
    String tt = t.toString();
    if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    StringBuilder s = new StringBuilder(sc.next());
    StringBuilder t = new StringBuilder(sc.next());
    int len = t.length();
    t = t.deleteCharAt(len - 1);
    String ss = s.toString();
    String tt = t.toString();
    if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } StringBuilder s = new StringBuilder(sc.next()); s new StringBuilder(sc.next()) StringBuilder t = new StringBuilder(sc.next()); t new StringBuilder(sc.next()) int len = t.length(); len t.length() t.length t t = t.deleteCharAt(len - 1) t t.deleteCharAt(len - 1) t.deleteCharAt t len - 1 len 1 String ss = s.toString(); ss s.toString() s.toString s String tt = t.toString(); tt t.toString() t.toString t if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } ss.equals(tt) ss.equals ss tt {
      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
import java.util.Scanner;

class Main {
  static Scanner sc = new Scanner(System.in);

  public static void main(String[] args) {
    StringBuilder s = new StringBuilder(sc.next());
    StringBuilder t = new StringBuilder(sc.next());
    int len = t.length();
    t = t.deleteCharAt(len - 1);
    String ss = s.toString();
    String tt = t.toString();
    if (ss.equals(tt)) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}