#include <iostream>
#include <string>
using namespace std;
int main()
{
string s, t;
string::size_type p, q;
while (cin >> s >> t)
{
p = 0;
for (string::const_iterator it = s.begin(); it != s.end(); ++it)
{
q = t.find_first_of(*it, p);
if (q == string::npos)
break;
p = q + 1;
}
if (q != string::npos)
cout << "Yes\n";
else
cout << "No\n";
}
return 0;
}