
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    }
} Main public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    } main {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    } final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str1 = scan.next(); str1 scan.next() scan.next scan String str2 = scan.next(); str2 scan.next() scan.next scan scan.close() scan.close scan if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } str1.equals(str2.substring(0, str2.length()-1)) str1.equals str1 str2.substring(0, str2.length()-1) str2.substring str2 0 str2.length()-1 str2.length() str2.length str2 1 {
            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" final String[] args args public class Main {
    public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    }
} public class Main {
    public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(final String[] args) throws Exception {
        final Scanner scan = new Scanner(System.in);
        String str1 = scan.next();
        String str2 = scan.next(); 
        scan.close();

        if (str1.equals(str2.substring(0, str2.length()-1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

        
    }
}
