
import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);
    static String S = sc.next();
    static String T = sc.next();

    public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner sc = new Scanner(System.in);
    static String S = sc.next();
    static String T = sc.next();

    public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static String S = sc.next(); S sc.next() sc.next sc static String T = sc.next(); T sc.next() sc.next sc public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    } main {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    } if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        } S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1 S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1 S.length() < 1 S.length() S.length S 1 S.length() > 10 S.length() S.length S 10 T.length() - S.length() != 1 T.length() - S.length() T.length() T.length T S.length() S.length S 1 {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        } char strS[] = S.toCharArray(); strS S.toCharArray() S.toCharArray S char strT[] = T.toCharArray(); strT T.toCharArray() T.toCharArray T for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            } {
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            } if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                } strS[i] != strT[i] strS[i] strS i strT[i] strT i {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    static Scanner sc = new Scanner(System.in);
    static String S = sc.next();
    static String T = sc.next();

    public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);
    static String S = sc.next();
    static String T = sc.next();

    public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} Main

import java.util.Scanner;

public class Main {
    static Scanner sc = new Scanner(System.in);
    static String S = sc.next();
    static String T = sc.next();

    public static void main(String[] args) {
        if (S.length() < 1 || S.length() > 10 || T.length() - S.length() != 1){
            System.out.println("No");
        } else {
            char strS[] = S.toCharArray();
            char strT[] = T.toCharArray();
            for (int i = 0; i < S.length(); i++){
                if (strS[i] != strT[i]) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
}
