import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String t = sc.next(); t sc.next() sc.next sc System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No") System.out.println System.out System System.out s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No" s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 s.charAt(0) == t.charAt(0) s.charAt(0) s.charAt s 0 t.charAt(0) t.charAt t 0 t.replaceFirst(s, "").length() == 1 t.replaceFirst(s, "").length() t.replaceFirst(s, "").length t.replaceFirst(s, "") t.replaceFirst t s "" 1 "Yes" "No" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	}
} Main
import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		System.out.println(s.charAt(0) == t.charAt(0) && t.replaceFirst(s, "").length() == 1 ? "Yes" : "No");
	}
}
