import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} Main public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	} main {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) String S = keyboard.next(); S keyboard.next() keyboard.next keyboard String T = keyboard.next(); T keyboard.next() keyboard.next keyboard String ans = "Yes"; ans "Yes" for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		} int x=0; int x=0; x 0 x<S.length() x S.length() S.length S x++ x++ x {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		} {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		} if(S.charAt(x) != T.charAt(x))
			ans = "No"; S.charAt(x) != T.charAt(x) S.charAt(x) S.charAt S x T.charAt(x) T.charAt T x ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		String S = keyboard.next();
		String T = keyboard.next();
		
		String ans = "Yes"; 
		for(int x=0; x<S.length(); x++) {
			if(S.charAt(x) != T.charAt(x))
			ans = "No";
		}
		
		System.out.println(ans);
		keyboard.close();
	}
}
