

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			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 sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} Main public static void main(String[] args) {
		Scanner sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	} Scanner sr = new Scanner(System.in); sr new Scanner(System.in) String str = sr.next(); str sr.next() sr.next sr String str2 = sr.next(); str2 sr.next() sr.next sr boolean flag =  true; flag true for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		} {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		} char  ch = str.charAt(i); ch str.charAt(i) str.charAt str i char ch2 = str2.charAt(i); ch2 str2.charAt(i) str2.charAt str2 i if(ch != ch2) {
				flag  = false;
				break;
			} ch != ch2 ch ch2 {
				flag  = false;
				break;
			} flag  = false flag false break; if(flag)
			System.out.println("Yes");
		else
			System.out.println("No"); flag System.out.println("Yes") System.out.println System.out System System.out "Yes" 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 sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} Main


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sr = new Scanner(System.in);
		String str = sr.next();
		String str2 = sr.next();
		boolean flag =  true; 
		for(int i = 0; i < str.length(); i++) {
			char  ch = str.charAt(i);
			char ch2 = str2.charAt(i);
			if(ch != ch2) {
				flag  = false;
				break;
			}
		}
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}
