import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			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) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	}

} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	} main {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String d=scan.next().toLowerCase(); d scan.next().toLowerCase() scan.next().toLowerCase scan.next() scan.next scan String s=scan.next().toLowerCase(); s scan.next().toLowerCase() scan.next().toLowerCase scan.next() scan.next scan String c=s.substring(0, s.length()-1); c s.substring(0, s.length()-1) s.substring s 0 s.length()-1 s.length() s.length s 1 if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No"); d.equalsIgnoreCase(c)==true d.equalsIgnoreCase(c) d.equalsIgnoreCase d c true {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" 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) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String d=scan.next().toLowerCase();
		String s=scan.next().toLowerCase();
		String c=s.substring(0, s.length()-1);
		if(d.equalsIgnoreCase(c)==true) {
			System.out.println("Yes");
		}
		else System.out.println("No");
		
		
	}

}
