using System;
using System.Collections.Generic;

public class Program {
    public static void Main() {
        string father = Console.ReadLine();
        char[] son = Console.ReadLine().ToCharArray();
        int i = 0;
        foreach(var v in father){
            if(v == son[i]){
                i++;
                if(i >= son.Length){
                    Console.WriteLine("Yes");
                    return;
                }
            }
        }
        Console.WriteLine("No");
    }
}