import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String s = scn.next(); s scn.next() scn.next scn String t = scn.next(); t scn.next() scn.next scn int size = s.length(); size s.length() s.length s String tCut = t.substring(0, size); tCut t.substring(0, size) t.substring t 0 size if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } s.equals(tCut) s.equals s tCut {
            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 class Main {
    public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner scn = new Scanner(System.in);
        String s = scn.next();
        String t = scn.next();
        int size = s.length();
        String tCut = t.substring(0, size);
        if (s.equals(tCut)){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
