
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String A = sc.next(); A sc.next() sc.next sc String B = sc.next(); B sc.next() sc.next sc if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} B.substring(0,A.length()). equals (A) B.substring(0,A.length()). equals B.substring(0,A.length()) B.substring B 0 A.length() A.length A A {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String A = sc.next();
		String B = sc.next();
		if(B.substring(0,A.length()). equals (A)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}
