1. JAVA, Peter Schnitzler

/* Problem : 10340
* Author : Peter Schnitzler
* Status : AC
* Runtime : 0.22
*/

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class Main
{


public static void main(String[] args) throws Exception
{
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
String line = read.readLine();

while (line != null)
{
StringTokenizer tok = new StringTokenizer(line);

String clear = tok.nextToken();
String code = tok.nextToken();

int posInClear = 0;
int posInCode = 0;
boolean result;


while (true)
{
if (clear.charAt(posInClear) == code.charAt(posInCode))
{
posInClear++;
}

posInCode++;


//all elements of the clear text were found in the code
if (posInClear == clear.length())
{
result = true;
break;
}

//the end of the code was reached without finding all elements of the clear text
if (posInCode == code.length())
{
result = false;
break;
}
}


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

line = read.readLine();
}
}

}