import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    } main {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String passS = scan.nextLine(); passS scan.nextLine() scan.nextLine scan String passT = scan.nextLine(); passT scan.nextLine() scan.nextLine scan int moji = passS.length(); moji passS.length() passS.length passS String passTa = passT.substring(0,moji); passTa passT.substring(0,moji) passT.substring passT 0 moji if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        } passS.equals(passTa) passS.equals passS passTa {
          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" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    }
} Main
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String passS = scan.nextLine();
        String passT = scan.nextLine();
        int moji = passS.length();
        String passTa = passT.substring(0,moji);
        if (passS.equals(passTa)) {
          System.out.println("Yes");
        } else {
          System.out.println("No");
        }
    }
}