import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] S = sc.next().toCharArray();
    char[] T = sc.next().toCharArray();
    for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    }
    if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] S = sc.next().toCharArray();
    char[] T = sc.next().toCharArray();
    for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    }
    if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] S = sc.next().toCharArray();
    char[] T = sc.next().toCharArray();
    for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    }
    if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    char[] S = sc.next().toCharArray();
    char[] T = sc.next().toCharArray();
    for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    }
    if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc char[] T = sc.next().toCharArray(); T sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    } int i=0; int i=0; i 0 i<S.length i S.length S S.length i++ i++ i {
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    } {
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    } if(S[i] != T[i]){
        System.out.print("No");
        return;
      } S[i] != T[i] S[i] S i T[i] T i {
        System.out.print("No");
        return;
      } System.out.print("No") System.out.print System.out System System.out "No" return; if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    } T.length - S.length == 1 T.length - S.length T.length T T.length S.length S S.length 1 {
      System.out.print("Yes");
    } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
      System.out.print("No");
    } System.out.print("No") System.out.print System.out System System.out "No" String[] args args
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] S = sc.next().toCharArray();
    char[] T = sc.next().toCharArray();
    for(int i=0; i<S.length; i++){
      if(S[i] != T[i]){
        System.out.print("No");
        return;
      }
    }
    if(T.length - S.length == 1 ){
      System.out.print("Yes");
    }else{
      System.out.print("No");
    }
  }
}
