#include <iostream>
using namespace std;
#include <bits/stdc++.h>
#include<string>
int main() {
// your code goes here
string a,b;
cin>>a;
cin>>b;
int n=a.size();
int m=b.size();
int count=0;
int i=0,j=0;
while(i<n && j<m)
{
if(a[i]==b[j])
{
count++;
i++;
j++;
}
else
{
i++;
}
}
if(count==m)
{
cout<<"yes";
}
else
{
cout<<"no";
}
//cout<<count;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KI2luY2x1ZGU8c3RyaW5nPgoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgkKCXN0cmluZyBhLGI7CgljaW4+PmE7CgljaW4+PmI7CglpbnQgbj1hLnNpemUoKTsKCWludCBtPWIuc2l6ZSgpOwoJaW50IGNvdW50PTA7CglpbnQgaT0wLGo9MDsKCSAgd2hpbGUoaTxuICYmIGo8bSkKCSAgIHsKCSAgIAkgaWYoYVtpXT09YltqXSkKCSAgIAkgIHsKCSAgIAkgIAljb3VudCsrOwoJICAgCSAgCWkrKzsKCSAgIAkgIAlqKys7CgkgICAJICB9CgkgICAJICBlbHNlCgkgICAJICAgewoJICAgCSAgIAlpKys7CgkgICAJICAgfQoJICAgfQoJICAgCgkgICBpZihjb3VudD09bSkKCSAgICB7CgkgICAgCWNvdXQ8PCJ5ZXMiOwoJICAgIH0KCSAgICBlbHNlCgkgICAgIHsKCSAgICAgCWNvdXQ8PCJubyI7CgkgICAgIH0KCS8vY291dDw8Y291bnQ7CglyZXR1cm4gMDsKfQ==