import java.util.Scanner;

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

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    } main {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    } 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 boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length())); result a.length() == b.length() - 1 && a.equals(b.substring(0, a.length())) a.length() == b.length() - 1 a.length() a.length a b.length() - 1 b.length() b.length b 1 a.equals(b.substring(0, a.length())) a.equals a b.substring(0, a.length()) b.substring b 0 a.length() a.length a System.out.println(result ? "Yes" : "No") System.out.println System.out System System.out result ? "Yes" : "No" result "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.next();
        String b = scanner.next();

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

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

        boolean result = a.length() == b.length() - 1 && a.equals(b.substring(0, a.length()));
        System.out.println(result ? "Yes" : "No");
    }
}