import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String t = sc.next(); t sc.next() sc.next sc int lenS = s.length(); lenS s.length() s.length s int lenT = t.length(); lenT t.length() t.length t boolean value = false; value false if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		} lenS == lenT lenS lenT {
			value = false;
		} value = false value false if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		} lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS)) lenS + 1 == lenT lenS + 1 lenS 1 lenT s.substring(0, lenS).equals(t.substring(0, lenS)) s.substring(0, lenS).equals s.substring(0, lenS) s.substring s 0 lenS t.substring(0, lenS) t.substring t 0 lenS {
			value = true;
		} value = true value true System.out.println(value ? "Yes" : "No") System.out.println System.out System System.out value ? "Yes" : "No" value "Yes" "No" String[] args args public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	}
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(); String t = sc.next(); int lenS = s.length(); int lenT = t.length();
		boolean value = false;
		if (lenS == lenT) {
			value = false;
		} else if (lenS + 1 == lenT && s.substring(0, lenS).equals(t.substring(0, lenS))) {
			value = true;
		}

		System.out.println(value ? "Yes" : "No");
	}
}
