include<stdio.h>

include<string.h>

int main()
{
char s[1000],t[1000];
while(scanf("%s",&s)!=EOF)
{
scanf("%s",&t);
int lens,lent,record=-1,count=0;
lens=strlen(s);
lent=strlen(t);
if(lent>lens)
{
printf("No\n");
return 0;
}
for(int i=0;i<lent;i++)
{
for(int j=record+1;j<lens;j++)
{
if(t[i]==s[j])
{
record=j;
count++;
break;
}
}
}
if(count==lent)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
return 0;
}