import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line1 = br.readLine(); line1 br.readLine() br.readLine br String line2 = br.readLine(); line2 br.readLine() br.readLine br System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No") System.out.println System.out System System.out line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No" line1.equals(line2.substring(0, line2.length() - 1)) line1.equals line1 line2.substring(0, line2.length() - 1) line2.substring line2 0 line2.length() - 1 line2.length() line2.length line2 1 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line1 = br.readLine();
		String line2 = br.readLine();
		System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
	}
}
