import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

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

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    } main {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in String s2 = in.next(); s2 in.next() in.next in char[] arr = s2.toCharArray(); arr s2.toCharArray() s2.toCharArray s2 String res = ""; res "" for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        } int i = 0; int i = 0; i 0 i < arr.length - 1 i arr.length - 1 arr.length arr arr.length 1 i++ i++ i {
            res += arr[i];
        } {
            res += arr[i];
        } res += arr[i] res arr[i] arr i if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } s.equals(res) s.equals s res {
            System.out.println("Yes");
        } 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 in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String s2 = in.next();
        char[] arr = s2.toCharArray();
        String res = "";
        for (int i = 0; i < arr.length - 1; i++) {
            res += arr[i];
        }
        if (s.equals(res)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
}