import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int l=s.length();
        boolean ans=true;
        for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        
        
        System.out.println();
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int l=s.length();
        boolean ans=true;
        for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        
        
        System.out.println();
    }
} Main public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int l=s.length();
        boolean ans=true;
        for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        
        
        System.out.println();
    } main {
        Scanner sc= new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int l=s.length();
        boolean ans=true;
        for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        
        
        System.out.println();
    } Scanner sc= new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc String t=sc.next(); t sc.next() sc.next sc int l=s.length(); l s.length() s.length s boolean ans=true; ans true for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        } int i=0; int i=0; i 0 i<l i l i++ i++ i {
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        } {
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        } char S=s.charAt(i); S s.charAt(i) s.charAt s i char T=t.charAt(i); T t.charAt(i) t.charAt t i if(S!=T){
                ans=false;
                break;
            } S!=T S T {
                ans=false;
                break;
            } ans=false ans false break; if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        } ans {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" System.out.println() System.out.println System.out System System.out String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int l=s.length();
        boolean ans=true;
        for(int i=0;i<l;i++){
            char S=s.charAt(i);
            char T=t.charAt(i);
            if(S!=T){
                ans=false;
                break;
            }
        }
        if(ans){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        
        
        System.out.println();
    }
}