import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	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) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
		scan.close();
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
		scan.close();
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
		scan.close();
	} Scanner scan =new Scanner(System.in); scan new Scanner(System.in) String a = scan.next(); a scan.next() scan.next scan String b = scan.next(); b scan.next() scan.next scan if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
} a.equals(b.substring(0,b.length()-1)) a.equals a b.substring(0,b.length()-1) b.substring b 0 b.length()-1 b.length() b.length b 1 {
	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) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	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) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan =new Scanner(System.in);

		String a = scan.next();
		String b = scan.next();


if(a.equals(b.substring(0,b.length()-1))) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
		scan.close();
	}

}
