import 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 len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"No");
	}
}
 import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String t = scan.next();
		int len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"No");
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String t = scan.next();
		int len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"No");
	} main {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		String t = scan.next();
		int len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"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 len = s.length(); len s.length() s.length s boolean ok = true; ok true for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		} int i = 0; int i = 0; i 0 i < len i len ++i ++i i {
			if(s.charAt(i) != t.charAt(i))ok = false;
		} {
			if(s.charAt(i) != t.charAt(i))ok = false;
		} if(s.charAt(i) != t.charAt(i))ok = false; s.charAt(i) != t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i ok = false ok false System.out.print(ok ? "Yes":"No") System.out.print System.out System System.out ok ? "Yes":"No" ok "Yes" "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 len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"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 len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"No");
	}
} Main
import 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 len = s.length();
		boolean ok = true;
		for(int i = 0;i < len; ++i){
			if(s.charAt(i) != t.charAt(i))ok = false;
		}
		System.out.print(ok ? "Yes":"No");
	}
}

