import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	}
} Main public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	} main {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String s1 = s.next(); s1 s.next() s.next s String s2 = s.next(); s2 s.next() s.next s char[] s1c = s1.toCharArray(); s1c s1.toCharArray() s1.toCharArray s1 char[] s2c = s2.toCharArray(); s2c s2.toCharArray() s2.toCharArray s2 boolean ok = true; ok true for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		} int i = 0; int i = 0; i 0 i < s1c.length i s1c.length s1c s1c.length i++ i++ i {
			if(s1c[i] != s2c[i])
				ok = false;
		} {
			if(s1c[i] != s2c[i])
				ok = false;
		} if(s1c[i] != s2c[i])
				ok = false; s1c[i] != s2c[i] s1c[i] s1c i s2c[i] s2c i ok = false ok false if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} ok {
			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" s.close() s.close s String args[] args public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	}
} public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		String s1 = s.next();
		String s2 = s.next();
		
		char[] s1c = s1.toCharArray();
		char[] s2c = s2.toCharArray();
		
		boolean ok = true;
		
		for(int i = 0; i < s1c.length; i++) {
			if(s1c[i] != s2c[i])
				ok = false;
		}
		
		if(ok) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
		s.close();
	}
}
