import java.util.Scanner;

public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    }
} Main static Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    } main {
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    } String s = stdIn.next(); s stdIn.next() stdIn.next stdIn String t = stdIn.next(); t stdIn.next() stdIn.next stdIn char[] cs = s.toCharArray(); cs s.toCharArray() s.toCharArray s char[] ct = t.toCharArray(); ct t.toCharArray() t.toCharArray t for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        } int i=0; int i=0; i 0 i<cs.length i cs.length cs cs.length i++ i++ i {
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        } {
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        } if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            } cs[i] != ct[i] cs[i] cs i ct[i] ct 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 stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    }
} public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        String t = stdIn.next();

        char[] cs = s.toCharArray();
        char[] ct = t.toCharArray();

        for(int i=0; i<cs.length; i++){
            if(cs[i] != ct[i]){
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");
    }
}