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();
	}
} import java.util.Scanner; Scanner java.util 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();
	}
} Main int o o h h s s e; e double q q w w a; a String  i i l l k; k Scanner scan=new Scanner(System.in); 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);
	} 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);
	} String[] date=new String[2]; date new String[2] 2 for(o=0;o<2;o++) {
	date[o]=scan.next();
} o=0; o=0 o 0 o<2 o 2 o++ o++ o {
	date[o]=scan.next();
} {
	date[o]=scan.next();
} date[o]=scan.next() date[o] date o scan.next() scan.next scan int len = date[1].length(); len date[1].length() date[1].length date[1] date 1 if(len-1==0) {
	i = date[1].substring(1);
}else {
 i = date[1].substring(len-1);
} len-1==0 len-1 len 1 0 {
	i = date[1].substring(1);
} i = date[1].substring(1) i date[1].substring(1) date[1].substring date[1] date 1 1 {
 i = date[1].substring(len-1);
} i = date[1].substring(len-1) i date[1].substring(len-1) date[1].substring date[1] date 1 len-1 len 1 l=date[0]+i l date[0]+i date[0] date 0 i if(l.equals(date[1])) {
	 System.out.println("Yes");
 }else {
	 System.out.println("No");
 } l.equals(date[1]) l.equals l date[1] date 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" public static void main(String[] args) {
		Main p=new Main();
		p.output();
	} main {
		Main p=new Main();
		p.output();
	} Main p=new Main(); p new Main() p.output() p.output p String[] args args 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();
	}
} 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();
	}
} Main
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();
	}
}