import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			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 scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} main {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan String T = scan.next(); T scan.next() scan.next scan int count = 0; count 0 for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		} {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		} char s = S.charAt(i); s S.charAt(i) S.charAt S i char t = T.charAt(i); t T.charAt(i) T.charAt T i if(s == t) {
				count++;
			} s == t s t {
				count++;
			} count++ count if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} count == S.length() count S.length() S.length S {
			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 scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		String T = scan.next();
		int count = 0; 
		
		for(int i=0;i<S.length();i++) {
			char s = S.charAt(i);
			char t = T.charAt(i);
			if(s == t) {
				count++;
			}
		}
		if(count == S.length()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

}
