import java.util.Scanner;
 
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str1 = scan.next(); str1 scan.next() scan.next scan String str2 = scan.next(); str2 scan.next() scan.next scan int cnt1 = str1.length(); cnt1 str1.length() str1.length str1 String str3 = str2.substring(0, cnt1); str3 str2.substring(0, cnt1) str2.substring str2 0 cnt1 if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} str1.equals(str3) str1.equals str1 str3 {
			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" scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    }
} public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    }
} Main
import java.util.Scanner;
 
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next();
        int cnt1 = str1.length();
        String str3 = str2.substring(0, cnt1);
        if (str1.equals(str3)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
        scan.close();
    }
}