#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265359;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long randint(long long a, long long b) {
  return uniform_int_distribution<long long>(a, b)(rng);
}
template <typename... Args>
void logger(string vars, Args&&... values) {
  cout << vars << " = ";
  string delim = "";
  (..., (cout << delim << values, delim = ", "));
  cout << endl;
}
void print(vector<long long> v) {
  cout << "[";
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i + 1 != v.size()) cout << ", ";
  }
  cout << "]" << endl;
}
void print(pair<long long, long long> p) {
  cout << "{" << p.first << ", " << p.second << "}" << endl;
}
vector<long long> Z(string& s) {
  long long n = s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; i++) {
    if (i < r) {
      z[i] = min(r - i, z[i - l]);
    }
    while (i + z[i] < n && s[i + z[i]] == s[z[i]]) {
      z[i]++;
    }
    if ((i + z[i]) >= r) {
      l = i;
      r = i + z[i];
    }
  }
  return z;
}
const long long mod1 = 1e9 + 9;
const long long mod2 = 1e9 + 7;
const long long mod3 = 90003047;
const long long qntdbase = 3;
const long long bases[qntdbase] = {mod1, mod2, mod3};
const long long base = 10;
const long long maxn = 1e6 + 10;
long long expBase[maxn][qntdbase];
void precalc() {
  for (long long j = 0; j < qntdbase; j++) {
    expBase[0][j] = 1;
    for (long long i = 1; i < maxn; i++) {
      expBase[i][j] = (expBase[i - 1][j] * base) % bases[j];
    }
  }
}
struct StringHash {
  vector<vector<long long>> hsh;
  StringHash() {}
  StringHash(string& _s) {
    hsh = vector<vector<long long>>(_s.length() + 1,
                                    vector<long long>(qntdbase, 0));
    for (long long j = 0; j < qntdbase; j++) {
      for (long long i = 0; i < _s.length(); i++) {
        hsh[i + 1][j] =
            ((hsh[i][j] * base) % bases[j] + (_s[i] - '0')) % bases[j];
      }
    }
  }
  vector<long long> get_value(long long a, long long b) {
    vector<long long> ans(qntdbase);
    for (long long j = 0; j < qntdbase; j++) {
      ans[j] = (bases[j] + hsh[b + 1][j] -
                ((hsh[a][j]) * expBase[b - a + 1][j]) % bases[j]) %
               bases[j];
    }
    return ans;
  }
};
StringHash sh;
vector<long long> criptog;
string s;
bool checa(long long l1, long long r1, long long l2, long long r2) {
  if (l1 < 0 || l2 < 0) return 0;
  if (r2 >= (long long)s.size() || r2 < 0) return 0;
  if (l2 > r2) return 0;
  if (r1 >= (long long)s.size() || r1 < 0) return 0;
  if (l1 > r1) return 0;
  auto teste = sh.get_value(l1, r1);
  auto teste2 = sh.get_value(l2, r2);
  long long cont = 0;
  for (long long i = 0; i < qntdbase; i++) {
    if ((teste[i] + teste2[i]) % bases[i] == criptog[i]) cont++;
  }
  if (cont == qntdbase) {
    if (l1 < l2) {
      cout << l1 + 1 << " " << r1 + 1 << '\n';
      cout << l2 + 1 << " " << r2 + 1 << '\n';
    } else {
      cout << l2 + 1 << " " << r2 + 1 << '\n';
      cout << l1 + 1 << " " << r1 + 1 << '\n';
    }
    return 1;
  }
  return 0;
}
signed main() {
  cin.tie(NULL);
  cin.sync_with_stdio(false);
  cin >> s;
  string soma;
  cin >> soma;
  precalc();
  long long n = soma.length();
  if (n == 1) {
    long long i = 0;
    long long i2 = 1;
    long long ssoma = stoi(soma);
    while (i2 < s.length()) {
      if ((s[i] - '0') + (s[i2] - '0') == ssoma) {
        cout << i + 1 << " " << i + 1 << '\n';
        cout << i2 + 1 << " " << i2 + 1 << '\n';
        return 0;
      }
      i++;
      i2++;
    }
    return 0;
  }
  long long l1 = 0;
  long long r1 = n - 2;
  long long l2 = n - 1;
  long long r2 = n - 1 + n - 2;
  sh = StringHash(s);
  StringHash hashsoma(soma);
  criptog = hashsoma.get_value(0, soma.length() - 1);
  while (r2 < s.length()) {
    if (checa(l1, r1, l2, r2)) return 0;
    l1++;
    r1++;
    l2++;
    r2++;
  }
  long long l = 0;
  long long r = n - 1;
  auto sgamb = soma + '$' + s;
  auto zf = Z(sgamb);
  while (r < s.length()) {
    long long lcp = zf[n + l + 1];
    long long ss = n - lcp;
    if (checa(l, r, r + 1, r + ss)) return 0;
    if (checa(l, r, r + 1, r + ss - 1)) return 0;
    if (checa(l, r, l - ss, l - 1)) return 0;
    if (checa(l, r, l - ss + 1, l - 1)) return 0;
    l++;
    r++;
  }
}

### Prompt

Develop a solution in Cpp to the problem described below:

Let's call a positive integer good if there is no digit 0 in its decimal representation.

For an array of a good numbers a, one found out that the sum of some two neighboring elements is equal to x (i.e. x = a_i + a_{i + 1} for some i). x had turned out to be a good number as well.

Then the elements of the array a were written out one after another without separators into one string s. For example, if a = [12, 5, 6, 133], then s = 1256133.

You are given a string s and a number x. Your task is to determine the positions in the string that correspond to the adjacent elements of the array that have sum x. If there are several possible answers, you can print any of them.

Input

The first line contains the string s (2 ≤ |s| ≤ 5 ⋅ 10^5).

The second line contains an integer x (2 ≤ x < 10^{200000}).

An additional constraint on the input: the answer always exists, i.e you can always select two adjacent substrings of the string s so that if you convert these substrings to integers, their sum is equal to x.

Output

In the first line, print two integers l_1, r_1, meaning that the first term of the sum (a_i) is in the string s from position l_1 to position r_1.

In the second line, print two integers l_2, r_2, meaning that the second term of the sum (a_{i + 1}) is in the string s from position l_2 to position r_2.

Examples

Input


1256133
17


Output


1 2
3 3


Input


9544715561
525


Output


2 3
4 6


Input


239923
5


Output


1 1
2 2


Input


1218633757639
976272


Output


2 7
8 13

Note

In the first example s[1;2] = 12 and s[3;3] = 5, 12+5=17.

In the second example s[2;3] = 54 and s[4;6] = 471, 54+471=525.

In the third example s[1;1] = 2 and s[2;2] = 3, 2+3=5.

In the fourth example s[2;7] = 218633 and s[8;13] = 757639, 218633+757639=976272.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265359;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long randint(long long a, long long b) {
  return uniform_int_distribution<long long>(a, b)(rng);
}
template <typename... Args>
void logger(string vars, Args&&... values) {
  cout << vars << " = ";
  string delim = "";
  (..., (cout << delim << values, delim = ", "));
  cout << endl;
}
void print(vector<long long> v) {
  cout << "[";
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i + 1 != v.size()) cout << ", ";
  }
  cout << "]" << endl;
}
void print(pair<long long, long long> p) {
  cout << "{" << p.first << ", " << p.second << "}" << endl;
}
vector<long long> Z(string& s) {
  long long n = s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; i++) {
    if (i < r) {
      z[i] = min(r - i, z[i - l]);
    }
    while (i + z[i] < n && s[i + z[i]] == s[z[i]]) {
      z[i]++;
    }
    if ((i + z[i]) >= r) {
      l = i;
      r = i + z[i];
    }
  }
  return z;
}
const long long mod1 = 1e9 + 9;
const long long mod2 = 1e9 + 7;
const long long mod3 = 90003047;
const long long qntdbase = 3;
const long long bases[qntdbase] = {mod1, mod2, mod3};
const long long base = 10;
const long long maxn = 1e6 + 10;
long long expBase[maxn][qntdbase];
void precalc() {
  for (long long j = 0; j < qntdbase; j++) {
    expBase[0][j] = 1;
    for (long long i = 1; i < maxn; i++) {
      expBase[i][j] = (expBase[i - 1][j] * base) % bases[j];
    }
  }
}
struct StringHash {
  vector<vector<long long>> hsh;
  StringHash() {}
  StringHash(string& _s) {
    hsh = vector<vector<long long>>(_s.length() + 1,
                                    vector<long long>(qntdbase, 0));
    for (long long j = 0; j < qntdbase; j++) {
      for (long long i = 0; i < _s.length(); i++) {
        hsh[i + 1][j] =
            ((hsh[i][j] * base) % bases[j] + (_s[i] - '0')) % bases[j];
      }
    }
  }
  vector<long long> get_value(long long a, long long b) {
    vector<long long> ans(qntdbase);
    for (long long j = 0; j < qntdbase; j++) {
      ans[j] = (bases[j] + hsh[b + 1][j] -
                ((hsh[a][j]) * expBase[b - a + 1][j]) % bases[j]) %
               bases[j];
    }
    return ans;
  }
};
StringHash sh;
vector<long long> criptog;
string s;
bool checa(long long l1, long long r1, long long l2, long long r2) {
  if (l1 < 0 || l2 < 0) return 0;
  if (r2 >= (long long)s.size() || r2 < 0) return 0;
  if (l2 > r2) return 0;
  if (r1 >= (long long)s.size() || r1 < 0) return 0;
  if (l1 > r1) return 0;
  auto teste = sh.get_value(l1, r1);
  auto teste2 = sh.get_value(l2, r2);
  long long cont = 0;
  for (long long i = 0; i < qntdbase; i++) {
    if ((teste[i] + teste2[i]) % bases[i] == criptog[i]) cont++;
  }
  if (cont == qntdbase) {
    if (l1 < l2) {
      cout << l1 + 1 << " " << r1 + 1 << '\n';
      cout << l2 + 1 << " " << r2 + 1 << '\n';
    } else {
      cout << l2 + 1 << " " << r2 + 1 << '\n';
      cout << l1 + 1 << " " << r1 + 1 << '\n';
    }
    return 1;
  }
  return 0;
}
signed main() {
  cin.tie(NULL);
  cin.sync_with_stdio(false);
  cin >> s;
  string soma;
  cin >> soma;
  precalc();
  long long n = soma.length();
  if (n == 1) {
    long long i = 0;
    long long i2 = 1;
    long long ssoma = stoi(soma);
    while (i2 < s.length()) {
      if ((s[i] - '0') + (s[i2] - '0') == ssoma) {
        cout << i + 1 << " " << i + 1 << '\n';
        cout << i2 + 1 << " " << i2 + 1 << '\n';
        return 0;
      }
      i++;
      i2++;
    }
    return 0;
  }
  long long l1 = 0;
  long long r1 = n - 2;
  long long l2 = n - 1;
  long long r2 = n - 1 + n - 2;
  sh = StringHash(s);
  StringHash hashsoma(soma);
  criptog = hashsoma.get_value(0, soma.length() - 1);
  while (r2 < s.length()) {
    if (checa(l1, r1, l2, r2)) return 0;
    l1++;
    r1++;
    l2++;
    r2++;
  }
  long long l = 0;
  long long r = n - 1;
  auto sgamb = soma + '$' + s;
  auto zf = Z(sgamb);
  while (r < s.length()) {
    long long lcp = zf[n + l + 1];
    long long ss = n - lcp;
    if (checa(l, r, r + 1, r + ss)) return 0;
    if (checa(l, r, r + 1, r + ss - 1)) return 0;
    if (checa(l, r, l - ss, l - 1)) return 0;
    if (checa(l, r, l - ss + 1, l - 1)) return 0;
    l++;
    r++;
  }
}

```