Codeforces Round 471 (Div. 2)
D
Scissors
Codeforces
2600
原题
← CE →
翻译中…

Jenya has recently acquired quite a useful tool — $*k*$-scissors for cutting strings. They are generally used for cutting out two non-intersecting substrings of length $*k*$ from an arbitrary string $*s*$ (its length should be at least $2·*k*$ in order to perform this operation) and concatenating them afterwards (preserving the initial order). For example, with the help of $2$-scissors you can cut $*ab*$ and $*de*$ out of $*abcde*$ and concatenate them into $*abde*$, but not $*ab*$ and $*bc*$ since they're intersecting.

翻译中…

It's a nice idea to test this tool before using it in practice. After looking through the papers, Jenya came up with two strings $*s*$ and $*t*$. His question is whether it is possible to apply his scissors to string $*s*$ such that the resulting concatenation contains $*t*$ as a substring?

翻译中…

Input

翻译中…

The first line contains three integers $*n*$, $*m*$, $*k*$ $(2 ≤ *m* ≤ 2·*k* ≤ *n* ≤ 5·10^{5})$ — length of $*s*$, length of $*t*$ and the aforementioned scissors' parameter correspondingly.

翻译中…

The next two lines feature $*s*$ and $*t*$ consisting of lowercase latin letters.

翻译中…

Output

翻译中…

If there is no answer, print «No».

翻译中…

Otherwise print «Yes» and two integers $*L*$ and $*R*$ denoting the indexes where cutted substrings start ($1$-indexed). If there are several possible answers, output any.

翻译中…

Note

翻译中…

In the first sample case you can cut out two substrings starting at $1$ and $5$. The resulting string baaaab contains aaaa as a substring.

翻译中…

In the second sample case the resulting string is bccb.

翻译中…

样例

Input #1
7 4 3
baabaab
aaaa
Output #1
Yes
1 5
InputCopy OutputCopy
Input #2
6 3 2
cbcbcb
bcc
Output #2
Yes
2 5
InputCopy OutputCopy
Input #3
7 5 3
aabbaaa
aaaaa
Output #3
No
InputCopy OutputCopy
题目信息
题号
955D
时间限制
1 s
内存限制
256 MB
标签
暴力
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。