
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			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 name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			}
		}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			}
		} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			}
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String name = sc.next(); name sc.next() sc.next sc String name2 = sc.next(); name2 sc.next() sc.next sc String name3 = name2.substring(0,name2.length()-1); name3 name2.substring(0,name2.length()-1) name2.substring name2 0 name2.length()-1 name2.length() name2.length name2 1 if(name.equals(name3)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			} name.equals(name3) name.equals name name3 {
			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 name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			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 name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			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 name = sc.next();
		String name2 = sc.next();
		String name3 = name2.substring(0,name2.length()-1);

		if(name.equals(name3)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
			}
		}

}