import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            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) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
} Main public static void main(String[] args) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    } main {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    } String a; a String b; b int count = 0; count 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = sc.next() a sc.next() sc.next sc b = sc.next() b sc.next() sc.next sc String new_b = ""; new_b "" new_b = b.substring(0,a.length()) new_b b.substring(0,a.length()) b.substring b 0 a.length() a.length a if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No"); a.equals(new_b) a.equals a new_b {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" 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) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
} public class Main {
    public static void main(String[] args) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        String a;
        String b;
        int count = 0;

        Scanner sc = new Scanner(System.in);
        a = sc.next();
        b = sc.next();
        String new_b = "";
        new_b = b.substring(0,a.length());
        if(a.equals(new_b))
        {
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
}
