import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			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) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("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 String st = s + t; st s + t s t int count = 0; count 0 if (s.length() != t.length() - 1) {
			count++;

		} s.length() != t.length() - 1 s.length() s.length s t.length() - 1 t.length() t.length t 1 {
			count++;

		} count++ count char[] s1 = s.toCharArray(); s1 s.toCharArray() s.toCharArray s char[] t1 = t.toCharArray(); t1 t.toCharArray() t.toCharArray t for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < s1.length i s1.length s1 s1.length i++ i++ i {
			if (s1[i] != t1[i]) {
				count++;
			}
		} {
			if (s1[i] != t1[i]) {
				count++;
			}
		} if (s1[i] != t1[i]) {
				count++;
			} s1[i] != t1[i] s1[i] s1 i t1[i] t1 i {
				count++;
			} count++ count if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} count == 0 count 0 {
			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) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		String st = s + t;
		int count = 0;
		if (s.length() != t.length() - 1) {
			count++;

		}
		char[] s1 = s.toCharArray();
		char[] t1 = t.toCharArray();
		for (int i = 0; i < s1.length; i++) {
			if (s1[i] != t1[i]) {
				count++;
			}
		}

		if (count == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

}
