import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] != t[i]) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] != t[i]) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

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

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] != t[i]) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();
        for (int i = 0 ; i < s.length ; i++) {
            if (s[i] != t[i]) {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

}