import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String a = in.next(); a in.next() in.next in String b = in.next(); b in.next() in.next in for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        } int i = 0; int i = 0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        } {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        } if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            } a.charAt(i)!=b.charAt(i) a.charAt(i) a.charAt a i b.charAt(i) b.charAt b 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{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    }
} public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)!=b.charAt(i)){
                System.out.println("No");return;
            }
        }
        System.out.println("Yes");
    }
}
