import java.util.Scanner;

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

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            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 scanner = new Scanner(System.in);
        String S = scanner.next();
        String T = scanner.next();

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        String T = scanner.next();

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        String T = scanner.next();

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner String T = scanner.next(); T scanner.next() scanner.next scanner if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        } S.equals(T.substring(0,S.length())) S.equals S T.substring(0,S.length()) T.substring T 0 S.length() S.length S {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } String ID = T.substring(S.length()); ID T.substring(S.length()) T.substring T S.length() S.length S if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            } ID.length() != 1 ID.length() ID.length ID 1 {
                System.out.println("No");
                System.exit(0);
            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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 scanner = new Scanner(System.in);
        String S = scanner.next();
        String T = scanner.next();

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        String T = scanner.next();

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

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

        if (S.equals(T.substring(0,S.length()))) {
            String ID = T.substring(S.length());
            if (ID.length() != 1) {
                System.out.println("No");
                System.exit(0);
            }
            System.out.println("Yes");
         } else {
            System.out.println("No");
        }
    }
}
