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