//package atcoder;
 
import java.util.*;
 
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s1 = sc.next(); s1 sc.next() sc.next sc String s2 = sc.next(); s2 sc.next() sc.next sc char S1[] = s1.toCharArray(); S1 s1.toCharArray() s1.toCharArray s1 char S2[] = s2.toCharArray(); S2 s2.toCharArray() s2.toCharArray s2 int count = 0; count 0 for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[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] == S2[i]) {
				count ++;
			}
		} {
			if(S1[i] == S2[i]) {
				count ++;
			}
		} if(S1[i] == S2[i]) {
				count ++;
			} S1[i] == S2[i] S1[i] S1 i S2[i] S2 i {
				count ++;
			} count ++ count if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} count == S1.length count S1.length S1 S1.length {
			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 s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			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 s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main
//package atcoder;
 
import java.util.*;
 
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		
		char S1[] = s1.toCharArray();
		char S2[] = s2.toCharArray();
	
		int count = 0;
		for(int i=0;i<S1.length;i++) {
			if(S1[i] == S2[i]) {
				count ++;
			}
		}
		if(count == S1.length) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}