import java.util.*;
public class Main {
    public static void main(String[] args ){
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args ){
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    }
} Main public static void main(String[] args ){
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    } main {
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    } Scanner o = new Scanner(System.in); o new Scanner(System.in) String s1 = o.nextLine(); s1 o.nextLine() o.nextLine o String s2 = o.nextLine(); s2 o.nextLine() o.nextLine o boolean ok = true; ok true for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        } int i = 0 ; int i = 0 ; i 0 i < s1.length() i s1.length() s1.length s1 i++ i++ i {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        } {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        } if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            } s1.charAt(i) != s2.charAt(i) s1.charAt(i) s1.charAt s1 i s2.charAt(i) s2.charAt s2 i {
                ok = false;
                break;
            } ok = false ok false break; if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        } !ok ok {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            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 o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    }
} public class Main {
    public static void main(String[] args ){
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args ){
        Scanner o = new Scanner(System.in);
        String s1 = o.nextLine();
        String s2 = o.nextLine();
        boolean ok = true;
        for ( int i = 0 ; i < s1.length() ; i++ )
        {
            if ( s1.charAt(i) != s2.charAt(i) )
            {
                ok = false;
                break;
            }
        }

        if(!ok){
            System.out.println("No");
        }
        else{
            System.out.println("Yes");
        }
        
    }
}