import java.util.Scanner;

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

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S, String T) {
        return T.startsWith(S);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S, String T) {
        return T.startsWith(S);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String T = sc.next(); T sc.next() sc.next sc System.out.println(solve(S, T) ? "Yes" : "No") System.out.println System.out System System.out solve(S, T) ? "Yes" : "No" solve(S, T) solve S T "Yes" "No" sc.close() sc.close sc String[] args args static boolean solve(String S, String T) {
        return T.startsWith(S);
    } solve {
        return T.startsWith(S);
    } return T.startsWith(S); T.startsWith(S) T.startsWith T S String S S String T T public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S, String T) {
        return T.startsWith(S);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S, String T) {
        return T.startsWith(S);
    }
} Main
import java.util.Scanner;

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

        String S = sc.next();
        String T = sc.next();

        System.out.println(solve(S, T) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(String S, String T) {
        return T.startsWith(S);
    }
}