#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;
}