import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    }
} Main public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    } main {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    } Scanner file = new Scanner(System.in); file new Scanner(System.in) String s = file.next() s file.next() file.next file t = file.next(); t file.next() file.next file System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No") System.out.println System.out System System.out s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No" s.equals(t.substring(0, t.length() - 1)) s.equals s t.substring(0, t.length() - 1) t.substring t 0 t.length() - 1 t.length() t.length t 1 "Yes" "No" file.close() file.close file String[] args args public class Main {
	public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    }
} public class Main {
	public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
    	Scanner file = new Scanner(System.in);
      	String s = file.next(), t = file.next();
      	System.out.println(s.equals(t.substring(0, t.length() - 1)) ? "Yes" : "No");
      	file.close();
    }
}
