import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in String t = in.next(); t in.next() in.next in String t2 = t.substring(0,t.length()-1); t2 t.substring(0,t.length()-1) t.substring t 0 t.length()-1 t.length() t.length t 1 boolean ok = false; ok false if(s.equals(t2)) {
			ok = true;
		} s.equals(t2) s.equals s t2 {
			ok = true;
		} ok = true ok true if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		} ok {
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		} if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			} t.length()-s.length() == 1 t.length()-s.length() t.length() t.length t s.length() s.length s 1 {
				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" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner in = new Scanner(System.in);
		String s = in.next();
		String t = in.next();
		String t2 = t.substring(0,t.length()-1);
		boolean ok = false;

		if(s.equals(t2)) {
			ok = true;
		}
		if(ok){
			if(t.length()-s.length() == 1) {
				System.out.println("Yes");
			}
		}else {
			System.out.println("No");
		}
	}

}
