import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    } main {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n1 = sc.nextLine(); n1 sc.nextLine() sc.nextLine sc String n2 = sc.nextLine(); n2 sc.nextLine() sc.nextLine sc if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		} n1.length() + 1 != n2.length() n1.length() + 1 n1.length() n1.length n1 1 n2.length() n2.length n2 {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		} String[] n1sp = n1.split(""); n1sp n1.split("") n1.split n1 "" String[] n2sp = n2.split(""); n2sp n2.split("") n2.split n2 "" int count = 0; count 0 for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			} int i = 0; int i = 0; i 0 i < n1.length() i n1.length() n1.length n1 i++ i++ i {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			} {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			} if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				} !(n1sp[i].equals(n2sp[i])) (n1sp[i].equals(n2sp[i])) n1sp[i].equals n1sp[i] n1sp i n2sp[i] n2sp i {
				System.out.println("No");
				break;
				} System.out.println("No") System.out.println System.out System System.out "No" break; {
				count++;
				} count++ count if(count == n1.length())
			System.out.println("Yes"); count == n1.length() count n1.length() n1.length n1 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n1 = sc.nextLine();
		String n2 = sc.nextLine();
		if (n1.length() + 1 != n2.length()) {
			System.out.println("No");
		}else{
			String[] n1sp = n1.split("");
			String[] n2sp = n2.split("");
			int count = 0;
			for (int i = 0; i < n1.length(); i++) {
				if (!(n1sp[i].equals(n2sp[i]))){
				System.out.println("No");
				break;
				}else{
				count++;
				}
			}
			if(count == n1.length())
			System.out.println("Yes");
		}
    }
}