C. Celayas New Sign
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

The city of Celaya is installing new street signs, and the mayor has appointed you to supervise the work. You have received a sign containing a string $$$A$$$ made of english uppercase characters, and you suspect it might be incorrect. However, you are clever and have discovered that you can perform the following operation on the sign without damaging it:

  1. First, partition the string $$$A$$$ into four contiguous substrings $$$P_1, P_2, P_3, P_4$$$. For example, for the text ABCD, the partitions $$$$$$ \texttt{A},\;\texttt{B},\;\texttt{C},\;\texttt{D} $$$$$$ and $$$$$$ \texttt{AB},\;\texttt{}\,\varepsilon,\;\texttt{CD},\;\texttt{}\,\varepsilon $$$$$$ are valid, while $$$$$$ \texttt{A},\;\texttt{C},\;\texttt{BD},\;\varepsilon $$$$$$ is not. We denote the empty string as $$$\varepsilon$$$.
  2. Then, create the string $$$$$$ A' = P_1\,P_3\,P_2\,P_4 $$$$$$ by concatenation, and replace $$$A$$$ with $$$A'$$$.

Unfortunately, there is not much time left before the deadline, so you may apply the operation at most once on the sign.

Given the current string on the sign and the correct one, determine whether it is possible to fix the sign or not.

Input

The first line of input contains the string $$$A$$$ ($$$1 \leq |A| \leq 10^5$$$), the string that's written on the sign.

The second line of input contains the string $$$B$$$ ($$$|A| = |B|$$$), the string that should be written on the sign.

It is guaranteed that the strings $$$A$$$ and $$$B$$$ have the same length and they consist of capital english letters.

Output

On the first line, print the word Yes if it is possible to fix the sign performing at most one operation, or the word No otherwise.

If it is possible to fix the sign, print three integers $$$l$$$ $$$r$$$ $$$k$$$ ($$$0 \leq l \leq r \lt |A|$$$, $$$0 \leq k \leq r - l$$$) on an additional line, which mean that we can fix the sign by taking:

$$$$$$ \begin{array}{ccc} P_{1} &= &A[0, l - 1] \\ P_{2} &= &A[l, r - k] \\ P_{3} &= &A[r - k + 1, r] \\ P_{4} &= &A[r + 1, |A| - 1] \\ \end{array} $$$$$$

Where $$$A[x, y]$$$ with $$$x \gt y$$$ represents an empty string.

If there are many possible answers, print any of them.

Example
Input
ABC
ACB
Output
Yes
1 2 1
Note

For the sample case, the string "ABC" can be transformed into the following strings:

  • "ABC", with $$$l = 0, r = 0, k = 0$$$, since:

    • $$$P_{1} = A[0, -1] = \varepsilon$$$
    • $$$P_{2} = A[0, 0] = \texttt{A}$$$
    • $$$P_{3} = A[1, 0] = \varepsilon$$$
    • $$$P_{4} = A[1, 2] = \texttt{BC}$$$
  • "CAB", with $$$l = 0, r = 2, k = 1$$$, since:

    • $$$P_{1} = A[0, -1] = \varepsilon$$$
    • $$$P_{2} = A[0, 1] = \texttt{AB}$$$
    • $$$P_{3} = A[2, 2] = \texttt{C}$$$
    • $$$P_{4} = A[3, 2] = \varepsilon$$$
  • "BCA", with $$$l = 0, r = 2, k = 2$$$, since:
    • $$$P_{1} = A[0, -1] = \varepsilon$$$
    • $$$P_{2} = A[0, 0] = \texttt{A}$$$
    • $$$P_{3} = A[1, 2] = \texttt{BC}$$$
    • $$$P_{4} = A[3, 2] = \varepsilon$$$
  • "ACB", with $$$l = 1, r = 2, k = 1$$$, since:

    • $$$P_{1} = A[0, 0] = \texttt{A}$$$
    • $$$P_{2} = A[1, 1] = \texttt{B}$$$
    • $$$P_{3} = A[2, 2] = \texttt{C}$$$
    • $$$P_{4} = A[3, 2] = \varepsilon$$$
  • "BAC", with $$$l = 0, r = 1, k = 1$$$, since:

    • $$$P_{1} = A[0, -1] = \varepsilon$$$
    • $$$P_{2} = A[0, 0] = \texttt{A}$$$
    • $$$P_{3} = A[1, 1] = \texttt{B}$$$
    • $$$P_{4} = A[2, 2] = \texttt{C}$$$