import java.util.*;
import java.lang.*;
 
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		}
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		} main {
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s s s1; s1 s=sc.next() s sc.next() sc.next sc s1=sc.next() s1 sc.next() sc.next sc int t t f=0; f 0 if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		} ((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))) ((s1.length()-s.length()) ==1) (s1.length()-s.length()) s1.length() s1.length s1 s.length() s.length s 1 (Character.isLetter(s1.charAt(s1.length()-1))) Character.isLetter Character s1.charAt(s1.length()-1) s1.charAt s1 s1.length()-1 s1.length() s1.length s1 1 {
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		} for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    } t=0; t=0 t 0 t<s.length() t s.length() s.length s t++ t++ t {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    } {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    } if(s.charAt(t) != s1.charAt(t))
		        f=1; s.charAt(t) != s1.charAt(t) s.charAt(t) s.charAt s t s1.charAt(t) s1.charAt s1 t f=1 f 1 if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    } f==0 f 0 {
		        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" {
		    System.out.println("No");
		    
		} 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) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		}
} public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		}
} Main
import java.util.*;
import java.lang.*;
 
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc=new Scanner(System.in);
		String s,s1;
		s=sc.next();
		s1=sc.next();
		int t,f=0;
		if(((s1.length()-s.length()) ==1) && (Character.isLetter(s1.charAt(s1.length()-1))))
		{
		    for(t=0;t<s.length();t++)
		    {
		        if(s.charAt(t) != s1.charAt(t))
		        f=1;
		    }
		    if(f==0)
		    {
		        System.out.println("Yes");
		    }
		    else{
		        System.out.println("No");
		    }
		}
		else{
		    System.out.println("No");
		    
		}
		    
		    
		}
}
