2020-09-20 08:17:26 +00:00
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2021-08-07 11:11:15 +00:00
|
|
|
int cnt, now;
|
|
|
|
string w, s;
|
2020-09-20 08:17:26 +00:00
|
|
|
|
2021-08-07 11:11:15 +00:00
|
|
|
int main() {
|
|
|
|
getline(cin, w);
|
|
|
|
getline(cin, s);
|
|
|
|
w = ' ' + w + ' ';
|
|
|
|
s = ' ' + s + ' ';
|
|
|
|
transform(w.begin(), w.end(), w.begin(), ::tolower);
|
|
|
|
transform(s.begin(), s.end(), s.begin(), ::tolower);
|
|
|
|
if (s.find(w) == string::npos) {
|
2020-09-20 08:17:26 +00:00
|
|
|
cout << -1 << endl;
|
2021-08-07 11:11:15 +00:00
|
|
|
} else {
|
|
|
|
while ((now = s.find(w, now)) != string::npos) cnt++, now++;
|
|
|
|
cout << cnt << ' ' << s.find(w) << endl;
|
2020-09-20 08:17:26 +00:00
|
|
|
}
|
|
|
|
return 0;
|
2021-08-07 11:11:15 +00:00
|
|
|
}
|