import java.util.Scanner;

/**
 * Description ：
 *
 * @author poyun
 * @version V1.0.0
 * @since 1.0
 * date 2020/5/10
 */
public class Main {

    public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    }


    public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    }


    public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    }
} Main public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    } main {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) String s = input.nextLine(); s input.nextLine() input.nextLine input String t = input.nextLine(); t input.nextLine() input.nextLine input System.out.println(compare(s,t)) System.out.println System.out System System.out compare(s,t) compare s t String[]args args public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    } compare {
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    } char[] chars1 = S.toCharArray(); chars1 S.toCharArray() S.toCharArray S char[] chars2 = T.toCharArray(); chars2 T.toCharArray() T.toCharArray T if(chars1.length>=chars2.length) return "No"; chars1.length>=chars2.length chars1.length chars1 chars1.length chars2.length chars2 chars2.length return "No"; "No" for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        } int i = 0; int i = 0; i 0 i < chars1.length i chars1.length chars1 chars1.length i++ i++ i {
            if(chars1[i]!=chars2[i]) return "No";
        } {
            if(chars1[i]!=chars2[i]) return "No";
        } if(chars1[i]!=chars2[i]) return "No"; chars1[i]!=chars2[i] chars1[i] chars1 i chars2[i] chars2 i return "No"; "No" return "Yes"; "Yes" String S S String T T public class Main {

    public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    }


    public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    }
} public class Main {

    public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    }


    public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    }
} Main
import java.util.Scanner;

/**
 * Description ：
 *
 * @author poyun
 * @version V1.0.0
 * @since 1.0
 * date 2020/5/10
 */
public class Main {

    public static void main(String[]args){
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String t = input.nextLine();
        System.out.println(compare(s,t));
    }


    public static String compare(String S , String T){
        char[] chars1 = S.toCharArray();
        char[] chars2 = T.toCharArray();
        if(chars1.length>=chars2.length) return "No";
        for (int i = 0; i < chars1.length; i++) {
            if(chars1[i]!=chars2[i]) return "No";
        }
        return "Yes";
    }
}
