Problem: Hurricane came to Berland and to suburbs Stringsvill. You are going to it to check if it's all right with you favorite string. Hurrinace broke it a bit by reversing some of its non-intersecting substrings. You have a photo of this string before hurricane and you want to restore it to original state using reversing minimum possible number of its substrings and find out which substrings you should reverse.

You are given a string s — original state of your string and string t — state of the string after hurricane. You should select k non-intersecting substrings of t in such a way that after reverse of these substrings string will be equal s and k is minimum possible.

Input

First line of input contains string s and second line contains string t. Both strings have same length and consist of lowercase English letters. 1 ≤ |s| = |t| ≤ 5·105

Output

In first line print k — minimum number of substrings you should reverse. Next output k lines. Each line should contain two integers li, ri meaning that you should reverse substring from symbol number li to symbol ri (strings are 1-indexed). These substrings shouldn't intersect. If there are multiple answers print any. If it's impossible to restore string output -1.

Example

Input

abcxxxdef
cbaxxxfed


Output

2
7 9
1 3

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1010000;
int d[N][26], cnt, f[N], fail[N], l[N], sz[N], p, n, i, diff[N], ac[N];
char s[N];
long long ans;
void add(int c, int n) {
  for (; s[n - l[p] - 1] != s[n]; p = f[p])
    ;
  if (!d[p][c]) {
    int np = ++cnt, q = f[p];
    l[np] = l[p] + 2;
    for (; s[n - l[q] - 1] != s[n]; q = f[q])
      ;
    f[np] = d[q][c];
    d[p][c] = np;
    diff[np] = l[np] - l[f[np]];
    ac[np] = (diff[np] == diff[f[np]] ? ac[f[np]] : f[np]);
  }
  sz[p = d[p][c]]++;
}
int dp[N], dq[N], pre[N];
void PAM() {
  l[1] = -1;
  f[0] = f[1] = cnt = 1;
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  dq[0] = 1;
  for (int i = 1; i <= n; ++i) {
    add(s[i] - 'a', i);
    for (int j = p; j; j = ac[j]) {
      dq[j] = i - l[ac[j]] - diff[j];
      if (ac[j] != f[j] && dp[dq[j]] > dp[dq[f[j]]]) dq[j] = dq[f[j]];
      if (!(i & 1) && dp[i] > dp[dq[j]] + 1)
        dp[i] = dp[dq[j]] + 1, pre[i] = dq[j];
    }
    if (s[i] == s[i - 1] && !(i & 1) && dp[i] > dp[i - 2])
      dp[i] = dp[i - 2], pre[i] = i - 2;
  }
  if (dp[n] > n) {
    cout << -1 << '\n';
    return;
  }
  cout << dp[n] << '\n';
  for (int i = n; i; i = pre[i])
    if (i - pre[i] > 2) cout << (pre[i] / 2 + 1) << ' ' << i / 2 << '\n';
}
char A[N], B[N];
int main() {
  cin >> A >> B;
  n = strlen(A);
  for (int i = 0; i < n; ++i) s[2 * i + 1] = A[i], s[2 * i + 2] = B[i];
  n *= 2;
  PAM();
  return 0;
}