/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

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

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/
import java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String t = sc.nextLine();
		int n = s.length();
		int m = t.length();
		int i,p=0;
		for(i=0; i<n; i++)
		{
		    if(s.charAt(i) != t.charAt(i))
		    {
		        p = 1;
		        break;
		    }
    	}
    	if(n+1 != m)
    	    p = 1;
    	if(p == 1)
    	    System.out.println("No");
    	else
    	    System.out.println("Yes");
}
}