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?
The first line contains three integers *n*, *m*, *k* (2 ≤ *m* ≤ 2·*k* ≤ *n* ≤ 5·10<sup class="upper-index">5</sup>) — 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.
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.
7 4 3
baabaab
aaaa
Yes
1 5
6 3 2
cbcbcb
bcc
Yes
2 5
7 5 3
aabbaaa
aaaaa
No
16 6 4
abcdcadbbbcacdca
dcadbc
Yes
4 10
81 5 3
acbbcccbcbcbbbabaabbbcbacbaabbabaacccaaaaaabbbaacbaabcbcacbbacacbaaaaccbbcacbbcba
cbbab
Yes
1 30
12 3 4
dbcbabbbdcbb
bba
No
18 3 4
dcdbdbadddbddbbccc
bba
Yes
1 6
7 3 3
aaabbaa
aaa
Yes
1 4
8 3 4
bcbaaaax
bcb
Yes
1 5
30 17 9
dbcdcdcdbddaabcbdcdbdacaddcdbc
bcdcdcdbdabcbdcdb
Yes
2 13
25 7 12
bbabaabbabbabbbabbabaabba
babaabb
Yes
2 14
28 14 9
deaeeabadeaecbebddaeaedebbdd
badeaecbeaeaed
Yes
7 19
12 8 4
aaaaabbbaaab
aaaaaaaa
No
2 2 1
ab
aa
No
2 2 1
aa
aa
Yes
1 2
4 3 2
aaba
aaa
No
4 2 2
acba
aa
No
27 13 12
baababbabbbbaaaabaabbbbaaaa
baababbabbbba
Yes
1 13
27 11 9
bbaabababaaaabbbbabaababaab
abababaabab
Yes
2 17
7 3 2
aabcbaa
aaa
Yes
1 6
#include <bits/stdc++.h>

using namespace std;

const int maxn = 1e6;

mt19937 rnd(322);

int z[maxn], zz[maxn];
int mx[maxn], mxx[maxn];
pair<int, int> pref[maxn];

int main()
{
    int n, m, k;
    cin >> n >> m >> k;
    string s, t;
    cin >> s >> t;

    string a = t + "@" + s;
    reverse(s.begin(), s.end());
    reverse(t.begin(), t.end());
    string b = t + "@" + s;

    int l = 0, r = 0;
	for (int i = 1; i < a.size(); ++i){
		if (i <= r)
			z[i] = min(r - i + 1, z[i - l]);

		while (i + z[i] < (int)a.size() && a[z[i]] == a[i + z[i]])
			++z[i];

		if (i + z[i] - 1 > r){
			l = i;
			r = i + z[i] - 1;
		}
	}

	l = 0, r = 0;
	for (int i = 1; i < b.size(); ++i){
		if (i <= r)
			zz[i] = min(r - i + 1, zz[i - l]);

		while (i + zz[i] < (int)b.size() && b[zz[i]] == b[i + zz[i]])
			++zz[i];

		if (i + zz[i] - 1 > r){
			l = i;
			r = i + zz[i] - 1;
		}
	}

	for (int i = m + 1; i <= (int)b.size() - k; ++i){
        int st = i - k + zz[i];
        if (i - m - 1 + k + k > n){
            break;
        }

        mxx[st] = max(mxx[st], zz[i]);
    }

	pref[m] = {mxx[m], m};
	for (int i = m + 1; i < (int)b.size(); ++i)
        pref[i] = max(pref[i - 1], {mxx[i], i});

    for (int i = m + 1; i <= (int)a.size() - k; ++i){
        int st = i - k + min(z[i], k);

        if (z[i] >= m){
            if (i - m + k + k <= n){
                cout << "Yes\n";
                cout << i - m << ' ' << i - m + k << '\n';
                return 0;
            }
        }

        mx[st] = max(mx[st], z[i]);
    }

    for (int i = m + 1; i <= (int)a.size(); ++i){
        int j = n - (i - m - 1) - k - k + m + 1;

        if (pref[j].first >= m - mx[i]){
            cout << "Yes\n";
            cout << i - m << ' ' << n - (pref[j].second - m - 1 + k - 1) << '\n';
        }
    }

    cout << "No\n";
    return 0;
}
