import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {
    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.util.Scanner; Scanner java.util public class Main {
    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main private static Scanner sc = new Scanner(new BufferedInputStream(System.in)); sc new Scanner(new BufferedInputStream(System.in)) public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } String s1 = sc.nextLine(); s1 sc.nextLine() sc.nextLine sc String s2 = sc.nextLine(); s2 sc.nextLine() sc.nextLine sc if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length())) s1.length() + 1 == s2.length() s1.length() + 1 s1.length() s1.length s1 1 s2.length() s2.length s2 s1.equals(s2.substring(0, s1.length())) s1.equals s1 s2.substring(0, s1.length()) s2.substring s2 0 s1.length() s1.length s1 {
            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 {
    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.io.BufferedInputStream;
import java.util.Scanner;

public class Main {
    private static Scanner sc = new Scanner(new BufferedInputStream(System.in));

    public static void main(String[] args) {
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        if (s1.length() + 1 == s2.length() && s1.equals(s2.substring(0, s1.length()))) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}