import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    }
} Main public static void main(String[] args) {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    } main {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    } Scanner scanner= new Scanner(System.in); scanner new Scanner(System.in) String a = scanner.next(); a scanner.next() scanner.next scanner String b = scanner.next(); b scanner.next() scanner.next scanner int i = 0; i 0 char[] a1 = a.toCharArray(); a1 a.toCharArray() a.toCharArray a char[] b1 = b.toCharArray(); b1 b.toCharArray() b.toCharArray b for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       } i = 0; i = 0 i 0 i<a1.length i a1.length a1 a1.length i++ i++ i {
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       } {
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       } if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           } a1[i]!=b1[i] a1[i] a1 i b1[i] b1 i {
               System.out.println("No");
               break;
           } System.out.println("No") System.out.println System.out System System.out "No" break; if (i == a1.length){
           System.out.println("Yes");
       } i == a1.length i a1.length a1 a1.length {
           System.out.println("Yes");
       } 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 scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    }
} public class Main {
    public static void main(String[] args) {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
       Scanner scanner= new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       int i = 0;
       char[] a1 = a.toCharArray();
       char[] b1 = b.toCharArray();

       for (i = 0;i<a1.length;i++){
           if (a1[i]!=b1[i]){
               System.out.println("No");
               break;
           }
       }
       if (i == a1.length){
           System.out.println("Yes");
       }

    }
}
