import 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();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
      String t = sc.next();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
      String t = sc.next();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   } main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
      String t = sc.next();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   } 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 boolean juage = false; juage false for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      } int  i = 0; int  i = 0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      } {
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      } if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         } s.charAt(i)!=t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i {
            System.out.println("No");
         } System.out.println("No") System.out.println System.out System System.out "No" if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         } s.charAt(i)==t.charAt(i) s.charAt(i) s.charAt s i t.charAt(i) t.charAt t i {
            juage = true;
         } juage = true juage true {
            juage = false;
            break;
         } juage = false juage false break; if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      } juage {
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      } if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         } s.length()+1==t.length() s.length()+1 s.length() s.length s 1 t.length() t.length t {
               System.out.println("Yes");
            
         } System.out.println("Yes") System.out.println System.out System System.out "Yes" 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();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
      String t = sc.next();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   }
} Main
import 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();
      boolean juage = false;
      for(int  i = 0;i<s.length();i++){
         if(s.charAt(i)!=t.charAt(i)){
            System.out.println("No");
         }
         if(s.charAt(i)==t.charAt(i)){
            juage = true;
         }
         else{
            juage = false;
            break;
         }
      }
         if(juage){
            if(s.length()+1==t.length()){
               System.out.println("Yes");
            
         }
      }
   }
}