A subsequence of length |x| of string s = s1s2... s|s| (where |s| is the length of string s) is a string x = sk1sk2... sk|x| (1 ≤ k1 < k2 < ... < k|x| ≤ |s|).

You've got two strings — s and t. Let's consider all subsequences of string s, coinciding with string t. Is it true that each character of string s occurs in at least one of these subsequences? In other words, is it true that for all i (1 ≤ i ≤ |s|), there is such subsequence x = sk1sk2... sk|x| of string s, that x = t and for some j (1 ≤ j ≤ |x|) kj = i.

Input

The first line contains string s, the second line contains string t. Each line consists only of lowercase English letters. The given strings are non-empty, the length of each string does not exceed 2·105.

Output

Print "Yes" (without the quotes), if each character of the string s occurs in at least one of the described subsequences, or "No" (without the quotes) otherwise.

Examples

Input

abab
ab


Output

Yes


Input

abacaba
aba


Output

No


Input

abc
ba


Output

No

Note

In the first sample string t can occur in the string s as a subsequence in three ways: abab, abab and abab. In these occurrences each character of string s occurs at least once.

In the second sample the 4-th character of the string s doesn't occur in any occurrence of string t.

In the third sample there is no occurrence of string t in string s.
import java.io.*;
import java.util.*;
public final class two_strings
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static ArrayList<Integer>[] al,al2;
	static int[] pre,suff;
	static char[] a,b;
	static int n,m;
	
	static void build1(int idx1,int idx2)
	{
		if(idx1>=m)
		{
			return;
		}
		pre[idx1]=searchFirst(b[idx1],idx2);build1(idx1+1,pre[idx1]);
	}
	
	static void build2(int idx1,int idx2,int idx3)
	{
		if(idx1>=m)
		{
			return;
		}
		suff[idx1]=searchLast(b[idx2],idx3);build2(idx1+1,idx2-1,suff[idx1]);
	}
	
	static int searchFirst(int idx1,int idx2)
	{
		int low=0,high=al[idx1].size()-1;
		while(low<high)
		{
			int mid=(low+high)>>1;
			if(al[idx1].get(mid)>idx2)
			{
				high=mid;
			}
			else
			{
				low=mid+1;
			}
		}
		return (al[idx1].size()>0 && al[idx1].get(low)>idx2?al[idx1].get(low):-1);
	}
	
	static int searchLast(int idx1,int idx2)
	{
		int low=0,high=al[idx1].size()-1;
		while(low<high)
		{
			int mid=(low+high+1)>>1;
			if(al[idx1].get(mid)<idx2)
			{
				low=mid;
			}
			else
			{
				high=mid-1;
			}
		}
		return (al[idx1].size()>0 && al[idx1].get(low)<idx2?al[idx1].get(low):-1);
	}
	
	@SuppressWarnings("unchecked")
    public static void main(String args[]) throws Exception
    {
		a=sc.next().toCharArray();b=sc.next().toCharArray();n=a.length;m=b.length;al=new ArrayList[123];al2=new ArrayList[123];
		for(int i=97;i<123;i++)
		{
			al[i]=new ArrayList<Integer>();al2[i]=new ArrayList<Integer>();
		}
		for(int i=0;i<n;i++)
		{
			al[a[i]].add(i);
		}
		for(int i=0;i<m;i++)
		{
			al2[b[i]].add(i);
		}
		pre=new int[m];suff=new int[m];build1(0,-1);build2(0,m-1,1000000);boolean ans=true;
		for(int i=0;i<m;i++)
		{
			if(pre[i]==-1 || suff[i]==-1)
			{
				ans=false;break;
			}
		}
		//out.println(Arrays.toString(pre)+" "+Arrays.toString(suff));
		for(int i=0;i<n;i++)
		{
			int low=0,high=m-1;
			while(low<high)
			{
				int mid=(low+high+1)>>1;
				if(pre[mid]<i)
				{
					low=mid;
				}
				else
				{
					high=mid-1;
				}
			}
			int val1=pre[low]<i?low+1:0;low=0;high=m-1;
			while(low<high)
			{
				int mid=(low+high+1)>>1;
				if(suff[mid]>i)
				{
					low=mid;
				}
				else
				{
					high=mid-1;
				}
			}
			int val2=suff[low]>i?low+1:0;low=0;high=al2[a[i]].size()-1;
			while(low<high)
			{
				int mid=(low+high+1)>>1;
				if(al2[a[i]].get(mid)<=val1)
				{
					low=mid;
				}
				else
				{
					high=mid-1;
				}
			}
		//	out.println(i+" "+val1+" "+val2);
			if(al2[a[i]].size()>0 && al2[a[i]].get(low)<=val1)
			{
				int curr=m-1-al2[a[i]].get(low);
				if(curr>val2)
				{
					ans=false;break;
				}
			}
			else
			{
				ans=false;break;
			}
		}
		out.println(ans?"Yes":"No");out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}