import java.util.Scanner;
public class Main{
	int o,h,s,e;
	double q,w,a;
	String  i,l,k;
	Scanner scan=new Scanner(System.in);
	public void output() {
String[] date=new String[2];
for(o=0;o<2;o++) {
	date[o]=scan.next();
}
int len = date[1].length();
if(len-1==0) {
	i = date[1].substring(1);
}else {
 i = date[1].substring(len-1);
}
l=date[0]+i;
 if(l.equals(date[1])) {
	 System.out.println("Yes");
 }else {
	 System.out.println("No");
 }
// System.out.println(date[0]);
 //System.out.println(i);
 //System.out.println(l);
	}
	public static void main(String[] args) {
		Main p=new Main();
		p.output();
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz