import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	} main {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) String s = kb.next(); s kb.next() kb.next kb String t = kb.next(); t kb.next() kb.next kb boolean j = true; j true for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		} {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		} if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			} s.charAt(i) != t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i {
				j = false;
				break;
			} j = false j false break; if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		} j && (s.length() + 1 == t.length()) j (s.length() + 1 == t.length()) s.length() + 1 s.length() s.length s 1 t.length() t.length t {
			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" kb.close() kb.close kb String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		String s = kb.next();
		String t = kb.next();
		boolean j = true;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i)) {
				j = false;
				break;
			}
		}
		if (j && (s.length() + 1 == t.length())) {
			System.out.println("Yes");
		}

		else {
			System.out.println("No");
		}
		kb.close();
	}

}
