import java.util.*;
 class Main {
    public static void main(String[] args) throws Exception{
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        boolean flag = stringMatching(S, T);
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    public static boolean stringMatching(String S, String T){
        if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        }
        int i = 0;
        int j = 0;
        while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        }

        if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) throws Exception{
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        boolean flag = stringMatching(S, T);
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    public static boolean stringMatching(String S, String T){
        if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        }
        int i = 0;
        int j = 0;
        while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        }

        if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        }
    }
} Main public static void main(String[] args) throws Exception{
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        boolean flag = stringMatching(S, T);
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        boolean flag = stringMatching(S, T);
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } 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 boolean flag = stringMatching(S, T); flag stringMatching(S, T) stringMatching S T if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } flag {
            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 static boolean stringMatching(String S, String T){
        if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        }
        int i = 0;
        int j = 0;
        while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        }

        if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        }
    } stringMatching {
        if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        }
        int i = 0;
        int j = 0;
        while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        }

        if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        }
    } if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        } S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length() S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length() S.length() == T.length() S.length() S.length S T.length() T.length T T.length() - S.length() > 1 T.length() - S.length() T.length() T.length T S.length() S.length S 1 T.length() < S.length() T.length() T.length T S.length() S.length S {
            return false;
        } return false; false int i = 0; i 0 int j = 0; j 0 while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        } i < S.length() i S.length() S.length S {
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        } if(S.charAt(i) != T.charAt(i)){
                return false;
            } S.charAt(i) != T.charAt(i) S.charAt(i) S.charAt S i T.charAt(i) T.charAt T i {
                return false;
            } return false; false i++ i j++ j if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        } i == S.length() && j != T.length() i == S.length() i S.length() S.length S j != T.length() j T.length() T.length T {
            return true;
        } return true; true {
            return false;
        } return false; false String S S String T T
import java.util.*;
 class Main {
    public static void main(String[] args) throws Exception{
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        boolean flag = stringMatching(S, T);
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
    public static boolean stringMatching(String S, String T){
        if(S.length() == T.length() || T.length() - S.length() > 1 || T.length() < S.length()){
            return false;
        }
        int i = 0;
        int j = 0;
        while(i < S.length()){
            if(S.charAt(i) != T.charAt(i)){
                return false;
            }
            i++;
            j++;
        }

        if(i == S.length() && j != T.length()){
            return true;
        }else{
            return false;
        }
    }
}
