import java.util.Scanner;

public class Main {
    public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    }
} Main public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    } main {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                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 for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        } {
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        } if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            } S.charAt(i) != T.charAt(i) S.charAt(i) S.charAt S i T.charAt(i) T.charAt T i {
                System.out.println("No");
                break;
            } System.out.println("No") System.out.println System.out System System.out "No" break; if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            } (i == S.length() - 1)&&(S.length() == T.length() -1 ) (i == S.length() - 1) i S.length() - 1 S.length() S.length S 1 (S.length() == T.length() -1 ) S.length() S.length S T.length() -1 T.length() T.length T 1 {
                System.out.println("Yes");
            } System.out.println("Yes") System.out.println System.out System System.out "Yes" if(S.length() == T.length()){
                System.out.println("No");
            } S.length() == T.length() S.length() S.length S T.length() T.length T {
                System.out.println("No");
            } System.out.println("No") System.out.println System.out System System.out "No" final String args[] args public class Main {
    public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    }
} public class Main {
    public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(final String args[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();
        for(int i = 0;i < S.length();i++){
            if(S.charAt(i) != T.charAt(i)){
                System.out.println("No");
                break;
            }else if((i == S.length() - 1)&&(S.length() == T.length() -1 )){
                System.out.println("Yes");
            }else if(S.length() == T.length()){
                System.out.println("No");
            }
        }
    }
}