import java.util.Scanner;

public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    }
} import java.util.Scanner; Scanner java.util public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

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

        solve();
    } main {

        solve();
    } solve() solve String[] args args private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    } solve {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    } String s1 = scanner.next(); s1 scanner.next() scanner.next scanner String s2 = scanner.next(); s2 scanner.next() scanner.next scanner System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No") System.out.println System.out System System.out s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No" s2.startsWith(s1) && s2.length() == s1.length() + 1 s2.startsWith(s1) s2.startsWith s2 s1 s2.length() == s1.length() + 1 s2.length() s2.length s2 s1.length() + 1 s1.length() s1.length s1 1 "Yes" "No" public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    }
} public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    }
} Main
import java.util.Scanner;

public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        String s1 = scanner.next();
        String s2 = scanner.next();


        System.out.println(s2.startsWith(s1) && s2.length() == s1.length() + 1 ? "Yes" : "No");

    }
}