import java.util.Scanner;

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

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } main {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan String t = scan.next(); t scan.next() scan.next scan if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        } s.length() + 1 != t.length() s.length() + 1 s.length() s.length s 1 t.length() t.length t {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        } !s.equals(t.substring(0, s.length())) s.equals(t.substring(0, s.length())) s.equals s t.substring(0, s.length()) t.substring t 0 s.length() s.length s {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
} Main
import java.util.Scanner;

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

        String s = scan.next();
        String t = scan.next();

        if (s.length() + 1 != t.length()) {
            System.out.println("No");
            return;
        }

        if (!s.equals(t.substring(0, s.length()))) {
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
}
