import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    }
} Main public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw=new PrintWriter(System.out); pw new PrintWriter(System.out) char carr1[]=br.readLine().toCharArray(); carr1 br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br char carr2[]=br.readLine().toCharArray(); carr2 br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br boolean b=true; b true for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        } int i=0; int i=0; i 0 i<carr1.length i carr1.length carr1 carr1.length i++ i++ i {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        } {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        } if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            } carr1[i]!=carr2[i] carr1[i] carr1 i carr2[i] carr2 i {
                b=false;
                break;
            } b=false b false break; if(b)
        pw.println("Yes");
        else
        pw.println("No"); b pw.println("Yes") pw.println pw "Yes" pw.println("No") pw.println pw "No" pw.flush() pw.flush pw pw.close() pw.close pw String args[] args public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    }
} public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    }
} Main
import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw=new PrintWriter(System.out);
        /*String str[]=br.readLine().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
        */
        char carr1[]=br.readLine().toCharArray();
        char carr2[]=br.readLine().toCharArray();
        boolean b=true;
        for(int i=0;i<carr1.length;i++)
        {
            if(carr1[i]!=carr2[i])
            {
                b=false;
                break;
            }
        }
        if(b)
        pw.println("Yes");
        else
        pw.println("No");
        pw.flush();
        pw.close();
    }
}