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;
char s[1000005], S[1000005], T[1000005];
int n, f[1000005], g[1000005], pr[1000005];
int fa[1000005], tr[1000005][26], len[1000005], dif[1000005], anc[1000005], tot,
    last;
void ins(int n, int c) {
  while (s[n] != s[n - len[last] - 1]) last = fa[last];
  if (!tr[last][c]) {
    len[++tot] = len[last] + 2;
    int u = fa[last];
    while (s[n] != s[n - len[u] - 1]) u = fa[u];
    fa[tot] = tr[u][c];
    dif[tot] = len[tot] - len[fa[tot]];
    anc[tot] = (dif[tot] == dif[fa[tot]] ? anc[fa[tot]] : fa[tot]);
    tr[last][c] = tot;
  }
  last = tr[last][c];
}
int main() {
  scanf("%s", S);
  scanf("%s", T);
  n = strlen(S);
  for (int i = (0), LIM = (n - 1); i <= LIM; i++)
    s[i << 1 | 1] = S[i], s[i + 1 << 1] = T[i];
  s[0] = '#';
  fa[0] = fa[1] = tot = 1;
  len[1] = -1;
  for (int i = (1), LIM = (n << 1); i <= LIM; i++) {
    ins(i, s[i] - 'a');
    f[i] = 0x3f3f3f3f;
    for (int u = last; u; u = anc[u]) {
      g[u] = i - len[anc[u]] - dif[u];
      if (dif[u] == dif[fa[u]])
        if (f[g[fa[u]]] < f[g[u]]) g[u] = g[fa[u]];
      if (!(i & 1))
        if (f[g[u]] + 1 < f[i]) f[i] = f[g[u]] + 1, pr[i] = g[u];
    }
    if (s[i] == s[i - 1])
      if (f[i - 2] < f[i]) f[i] = f[i - 2], pr[i] = i - 2;
  }
  if (f[n << 1] >= 0x3f3f3f3f) {
    puts("-1");
    return 0;
  }
  printf("%d\n", f[n << 1]);
  for (int u = n << 1; u; u = pr[u])
    if (pr[u] / 2 + 1 != u / 2) printf("%d %d\n", pr[u] / 2 + 1, u / 2);
}