import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	}
} Main public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String T = sc.next(); T sc.next() sc.next sc sc.close() sc.close sc System.out.println(T.startsWith(S) ? "Yes" : "No") System.out.println System.out System System.out T.startsWith(S) ? "Yes" : "No" T.startsWith(S) T.startsWith T S "Yes" "No" final String[] args args public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	}
} public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		sc.close();
		System.out.println(T.startsWith(S) ? "Yes" : "No");
	}
}
