A subsequence of length |*x*| of string *s* = *s*<sub class="lower-index">1</sub>*s*<sub class="lower-index">2</sub>... *s*<sub class="lower-index">|*s*|</sub> (where |*s*| is the length of string *s*) is a string *x* = *s*<sub class="lower-index">*k*<sub class="lower-index">1</sub></sub>*s*<sub class="lower-index">*k*<sub class="lower-index">2</sub></sub>... *s*<sub class="lower-index">*k*<sub class="lower-index">|*x*|</sub></sub> (1 ≤ *k*<sub class="lower-index">1</sub> &lt; *k*<sub class="lower-index">2</sub> &lt; ... &lt; *k*<sub class="lower-index">|*x*|</sub> ≤ |*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* = *s*<sub class="lower-index">*k*<sub class="lower-index">1</sub></sub>*s*<sub class="lower-index">*k*<sub class="lower-index">2</sub></sub>... *s*<sub class="lower-index">*k*<sub class="lower-index">|*x*|</sub></sub> of string *s*, that *x* = *t* and for some *j* (1 ≤ *j* ≤ |*x*|) *k*<sub class="lower-index">*j*</sub> = *i*.
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·10<sup class="upper-index">5</sup>.
import os, sys
from io import BytesIO, IOBase


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, 8192))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, 8192))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
inp = lambda dtype: [dtype(x) for x in input().split()]
inp_2d = lambda dtype, n: [dtype(input()) for _ in range(n)]
inp_2ds = lambda dtype, n: [inp(dtype) for _ in range(n)]
inp_enu = lambda dtype: [(i, x) for i, x in enumerate(inp(dtype))]
inp_enus = lambda dtype, n: [[i] + inp(dtype) for i in range(n)]
ceil1 = lambda a, b: (a + b - 1) // b

s, t = input(), input()
ls, lt = len(s), len(t)
be, en, ix = [-1] * lt, [-1] * lt, 0

for i in range(ls):
    if ix < lt and s[i] == t[ix]:
        be[ix] = i
        ix += 1

ix = lt - 1
for i in range(ls - 1, -1, -1):
    if ix > -1 and s[i] == t[ix]:
        en[ix] = i
        ix -= 1

if ix > -1:
    exit(print('No'))

mem = [[0] * (ls + 1) for _ in range(26)]
for i in range(lt):
    ch = ord(t[i]) - 97
    mem[ch][be[i]] += 1
    mem[ch][en[i] + 1] -= 1

for i in range(26):
    for j in range(1, ls + 1):
        mem[i][j] += mem[i][j - 1]

for i in range(ls):
    ch = ord(s[i]) - 97
    if not mem[ch][i]:
        exit(print('No'))

print('Yes')
