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.
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class x223B
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         char[] arr = infile.readLine().toCharArray();
         char[] brr = infile.readLine().toCharArray();
         int N = arr.length;  int M = brr.length;
         if(N < M || bad(arr, brr))
            System.out.println("No");
         else
         {
            int[] left = new int[N];
            int[] right = new int[N];
            int[] place = new int[26];
            Arrays.fill(place, N+M+M+N);
            int dex = 0;
            for(int i=0; i < N; i++)
            {
               if(dex < M && arr[i] == brr[dex])
               {
                  left[i] = place[arr[i]-'a'] = dex;
                  dex++;
               }
               else
                  left[i] = place[arr[i]-'a'];
            }
            dex = M-1;
            place = new int[26];
            Arrays.fill(place, N+M+M+N);
            for(int i=N-1; i >= 0; i--)
            {
               if(dex >= 0 && arr[i] == brr[dex])
               {
                  right[i] = place[arr[i]-'a'] = dex;
                  dex--;
               }
               else
                  right[i] = place[arr[i]-'a'];
            }
            /*
            Arrays.fill(left, -1);
            Arrays.fill(right, -1);
            int dex = 0;
            for(int i=0; i < N; i++)
            {
               if(dex < M && arr[i] == brr[dex])
               {
                  left[dex] = i;
                  dex++;
               }
            }
            dex = M-1;
            for(int i=N-1; i >= 0; i--)
            {
               if(dex >= 0 && arr[i] == brr[dex])
               {
                  right[dex] = i;
                  dex--;
               }
            }
            */
            String res = "Yes";
            for(int i=0; i < N; i++)
               if(right[i] > left[i])
                  res = "No";
            System.out.println(res);
         }
      }
      public static boolean bad(char[] a, char[] b)
      {
         HashSet<Character> set = new HashSet<Character>();
         for(char c: b)
            set.add(c);
         for(char c: a)
            if(!set.contains(c))
               return true;
         return false;
      }
   }