import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            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) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    } main {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String a = scanner.next(); a scanner.next() scanner.next scanner String b = scanner.next(); b scanner.next() scanner.next scanner if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        } (a.length() + 1 == b.length()) && b.startsWith(a) (a.length() + 1 == b.length()) a.length() + 1 a.length() a.length a 1 b.length() b.length b b.startsWith(a) b.startsWith b a {
            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) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        String a = scanner.next();
        String b = scanner.next();

        if((a.length() + 1 == b.length()) && b.startsWith(a)) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}