#include <bits/stdc++.h>
using namespace std;
const int MOD[] = {597804841, 618557587, 998244353, 1000000007, 1000000009};
const int N = 500 * 1000 + 13;
const int K = 5;
using hs = array<int, K>;
int add(int x, int y, int mod) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  return x;
}
int mul(int x, int y, int mod) { return x * 1LL * y % mod; }
hs get(const int& x) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = x;
  return c;
}
hs operator+(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = add(a[i], b[i], MOD[i]);
  return c;
}
hs operator-(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = add(a[i], -b[i], MOD[i]);
  return c;
}
hs operator*(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = mul(a[i], b[i], MOD[i]);
  return c;
}
int n, m;
string s, sx;
hs sum[N], pw[N];
hs get(int l, int r) { return sum[r] - sum[l] * pw[r - l]; }
vector<int> zfunction(const string& s) {
  int n = s.size();
  vector<int> z(n);
  int l = 0, r = 0;
  for (int i = 1; i < n; ++i) {
    if (i <= r) z[i] = min(z[i - l], r - i + 1);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s >> sx;
  n = s.size();
  m = sx.size();
  pw[0] = get(1);
  for (int i = 0; i < int(N - 1); ++i) pw[i + 1] = pw[i] * get(10);
  sum[0] = get(0);
  for (int i = 0; i < int(n); ++i)
    sum[i + 1] = sum[i] * get(10) + get(s[i] - '0');
  hs x = get(0);
  for (int i = 0; i < int(m); ++i) x = x * get(10) + get(sx[i] - '0');
  if (m > 1)
    for (int i = 0; i + 2 * (m - 1) <= n; ++i) {
      if (get(i, i + m - 1) + get(i + m - 1, i + 2 * (m - 1)) == x) {
        cout << i + 1 << ' ' << i + m - 1 << '\n';
        cout << i + m << ' ' << i + 2 * (m - 1) << '\n';
        return 0;
      }
    }
  auto z = zfunction(sx + "#" + s);
  for (int i = 0; i + m <= n; ++i) {
    int lcp = z[m + i + 1];
    for (int len = m - lcp - 1; len <= m - lcp; ++len) {
      if (len < 1) continue;
      if (i + m + len <= n && get(i, i + m) + get(i + m, i + m + len) == x) {
        cout << i + 1 << ' ' << i + m << '\n';
        cout << i + m + 1 << ' ' << i + m + len << '\n';
        return 0;
      }
      if (i >= len && get(i - len, i) + get(i, i + m) == x) {
        cout << i - len + 1 << ' ' << i << '\n';
        cout << i + 1 << ' ' << i + m << '\n';
        return 0;
      }
    }
  }
}

### Prompt

Your challenge is to write a cpp solution to the following problem:

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 int MOD[] = {597804841, 618557587, 998244353, 1000000007, 1000000009};
const int N = 500 * 1000 + 13;
const int K = 5;
using hs = array<int, K>;
int add(int x, int y, int mod) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  return x;
}
int mul(int x, int y, int mod) { return x * 1LL * y % mod; }
hs get(const int& x) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = x;
  return c;
}
hs operator+(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = add(a[i], b[i], MOD[i]);
  return c;
}
hs operator-(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = add(a[i], -b[i], MOD[i]);
  return c;
}
hs operator*(const hs& a, const hs& b) {
  hs c;
  for (int i = 0; i < int(K); ++i) c[i] = mul(a[i], b[i], MOD[i]);
  return c;
}
int n, m;
string s, sx;
hs sum[N], pw[N];
hs get(int l, int r) { return sum[r] - sum[l] * pw[r - l]; }
vector<int> zfunction(const string& s) {
  int n = s.size();
  vector<int> z(n);
  int l = 0, r = 0;
  for (int i = 1; i < n; ++i) {
    if (i <= r) z[i] = min(z[i - l], r - i + 1);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s >> sx;
  n = s.size();
  m = sx.size();
  pw[0] = get(1);
  for (int i = 0; i < int(N - 1); ++i) pw[i + 1] = pw[i] * get(10);
  sum[0] = get(0);
  for (int i = 0; i < int(n); ++i)
    sum[i + 1] = sum[i] * get(10) + get(s[i] - '0');
  hs x = get(0);
  for (int i = 0; i < int(m); ++i) x = x * get(10) + get(sx[i] - '0');
  if (m > 1)
    for (int i = 0; i + 2 * (m - 1) <= n; ++i) {
      if (get(i, i + m - 1) + get(i + m - 1, i + 2 * (m - 1)) == x) {
        cout << i + 1 << ' ' << i + m - 1 << '\n';
        cout << i + m << ' ' << i + 2 * (m - 1) << '\n';
        return 0;
      }
    }
  auto z = zfunction(sx + "#" + s);
  for (int i = 0; i + m <= n; ++i) {
    int lcp = z[m + i + 1];
    for (int len = m - lcp - 1; len <= m - lcp; ++len) {
      if (len < 1) continue;
      if (i + m + len <= n && get(i, i + m) + get(i + m, i + m + len) == x) {
        cout << i + 1 << ' ' << i + m << '\n';
        cout << i + m + 1 << ' ' << i + m + len << '\n';
        return 0;
      }
      if (i >= len && get(i - len, i) + get(i, i + m) == x) {
        cout << i - len + 1 << ' ' << i << '\n';
        cout << i + 1 << ' ' << i + m << '\n';
        return 0;
      }
    }
  }
}

```