import java.io.*;
public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	}
} import java.io.*; io.* java public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	}
} Main public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String A = br.readLine(); A br.readLine() br.readLine br String B = br.readLine(); B br.readLine() br.readLine br boolean issame = true; issame true for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < A.length() i A.length() A.length A i++ i++ i {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		} {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		} if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			} A.charAt(i) != B.charAt(i) A.charAt(i) A.charAt A i B.charAt(i) B.charAt B i {
				issame = false;
				break;
			} issame = false issame false break; if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} issame {
			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[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	}
} public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	}
} Main
import java.io.*;
public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		String B = br.readLine();
		
		boolean issame = true;
		for (int i = 0; i < A.length(); i++) {
			if (A.charAt(i) != B.charAt(i)) {
				issame = false;
				break;
			}
		}
		
		if (issame) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
						
	}
}