import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    }
  
  private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  }
  
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    }
  
  private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  }
  
} Main public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    } main {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    } String[] lines = getStdin(); lines getStdin() getStdin String id = lines[0]; id lines[0] lines 0 char[] s = id.toCharArray(); s id.toCharArray() id.toCharArray id String newid = lines[1]; newid lines[1] lines 1 char[] t = newid.toCharArray(); t newid.toCharArray() newid.toCharArray newid if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    } s.length + 1 != t.length s.length + 1 s.length s s.length 1 t.length t t.length {
        System.out.println("No");
        return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } int i = 0; int i = 0; i 0 i < t.length -1 i t.length -1 t.length t t.length 1 i++ i++ i {
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } {
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } if (s[i] != t[i]){
            System.out.println("No");
            return;
        } s[i] != t[i] s[i] s i t[i] t i {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  } getStdin {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) ArrayList<String> lines = new ArrayList<>(); lines new ArrayList<>() while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    } scanner.hasNext() scanner.hasNext scanner {
      lines.add(scanner.nextLine());
    } lines.add(scanner.nextLine()) lines.add lines scanner.nextLine() scanner.nextLine scanner return lines.toArray(new String[lines.size()]); lines.toArray(new String[lines.size()]) lines.toArray lines new String[lines.size()] lines.size() lines.size lines public class Main {
    public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    }
  
  private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  }
  
} public class Main {
    public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    }
  
  private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  }
  
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
    String[] lines = getStdin();
    String id = lines[0];
    char[] s = id.toCharArray();
    String newid = lines[1];
    char[] t = newid.toCharArray();
    
    if(s.length + 1 != t.length){
        System.out.println("No");
        return;
    }
    
    for (int i = 0; i < t.length -1; i++){
        if (s[i] != t[i]){
            System.out.println("No");
            return;
        }
        
    } System.out.println("Yes");
    }
  
  private static String[] getStdin() {
    Scanner scanner = new Scanner(System.in);
    ArrayList<String> lines = new ArrayList<>();
    while (scanner.hasNext()) {
      lines.add(scanner.nextLine());
    }
    return lines.toArray(new String[lines.size()]);
  }
  
}