
import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}}
} import java.util.Scanner; Scanner java.util public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}}
} Main public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}} main {
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String a=scanner.next(); a scanner.next() scanner.next scanner String b=scanner.next(); b scanner.next() scanner.next scanner for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	} int i = 0; int i = 0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	} {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	} String str1 = String.valueOf(a.charAt(i)); str1 String.valueOf(a.charAt(i)) String.valueOf String a.charAt(i) a.charAt a i String str2 = String.valueOf(b.charAt(i)); str2 String.valueOf(b.charAt(i)) String.valueOf String b.charAt(i) b.charAt b i if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    } str1.equals(str2) str1.equals str1 str2 {
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        } if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	} i==a.length()-1 i a.length()-1 a.length() a.length a 1 {
	    		System.out.println("Yes");
	    		break;
	    	} System.out.println("Yes") System.out.println System.out System System.out "Yes" break; {
	    	System.out.println("No");
	    	break;
	    } System.out.println("No") System.out.println System.out System System.out "No" break; String args[] args public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}}
} public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}}
} Main

import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
	Scanner scanner = new Scanner(System.in);
	// "abc"という文字列
	String a=scanner.next();
	String b=scanner.next();
	// 変数strの長さ分回す
	for (int i = 0; i < a.length(); i++) {
	    // strの先頭から1文字ずつString型にして取り出す
	    String str1 = String.valueOf(a.charAt(i));
	    String str2 = String.valueOf(b.charAt(i));
	    if(str1.equals(str2)){
	    	if(i==a.length()-1) {
	    		System.out.println("Yes");
	    		break;
	    	}
        }
	    else {
	    	System.out.println("No");
	    	break;
	    }

	}}
}
