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 oo = 0x3f3f3f3f;
const long long ooo = 9223372036854775807ll;
const int _cnt = 1000 * 1000 + 7;
const int _p = 1000 * 1000 * 1000 + 7;
const int N = 1000005;
const double PI = acos(-1.0);
const double eps = 1e-9;
int o(int x) { return x % _p; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
void file_put() {
  freopen("filename.in", "r", stdin);
  freopen("filename.out", "w", stdout);
}
const int M = 26;
struct PAM {
  int s[N], len[N], next[N][M], fail[N], cnt[N], dep[N], id[N], no[N], last, n,
      p, cur, now;
  int df[N], slink[N], dp[N], res[N], pre[N];
  long long ans;
  inline int new_node(int _l) {
    memset(next[p], 0, sizeof(next[p]));
    cnt[p] = dep[p] = 0, len[p] = _l;
    return p++;
  }
  inline void Init() {
    new_node(p = 0), new_node(s[0] = -1), fail[last = n = 0] = 1;
  }
  inline int get_fail(int x) {
    for (; s[n - len[x] - 1] != s[n]; x = fail[x])
      ;
    return x;
  }
  inline void I(int c) {
    c -= 'a', s[++n] = c, cur = get_fail(last);
    if (!next[cur][c]) {
      now = new_node(len[cur] + 2);
      fail[now] = next[get_fail(fail[cur])][c];
      next[cur][c] = now;
      dep[now] = dep[fail[now]] + 1;
    }
    last = next[cur][c], cnt[last]++;
    id[n] = last, no[last] = n;
    df[last] = len[last] - len[fail[last]];
    slink[last] = (df[last] == df[fail[last]]) ? slink[fail[last]] : fail[last];
  }
  inline void Insert(char s[], int op = 0, int _n = 0) {
    if (!_n) _n = strlen(s);
    if (!op)
      for (int i = (0); i <= (_n - 1); ++i) I(s[i]);
    else
      for (int i = (_n - 1); i >= (0); --i) I(s[i]);
  }
  inline void count() {
    for (int i = (p - 1); i >= (0); --i) cnt[fail[i]] += cnt[i];
  }
  inline void Q() {
    for (int i = (0); i <= (n + 5); ++i) dp[i] = oo;
    dp[0] = 0;
    memset(pre, 0, sizeof(pre));
    for (int i = (1); i <= (n); ++i) {
      for (int t = id[i]; len[t] > 0; t = slink[t]) {
        res[t] = i - len[slink[t]] - df[t];
        if (df[t] == df[fail[t]] && dp[res[fail[t]]] < dp[res[t]])
          res[t] = res[fail[t]];
        if (!((i)&1) && dp[i] > dp[res[t]] + 1)
          dp[i] = dp[res[t]] + 1, pre[i] = res[t];
      }
      if (!((i)&1) && s[i] == s[i - 1] && dp[i] > dp[i - 2])
        dp[i] = dp[i - 2], pre[i] = i - 2;
    }
    printf("%d\n", dp[n] == oo ? -1 : dp[n]);
    if (dp[n] != oo)
      for (int t = n; t; t = pre[t])
        if (pre[t] / 2 + 1 != t / 2) printf("%d %d\n", pre[t] / 2 + 1, t / 2);
  }
};
PAM T;
char s[N], t[N];
int n;
int main() {
  scanf("%s%s", s, t);
  n = strlen(s);
  T.Init();
  for (int i = (0); i <= (n - 1); ++i) T.I(s[i]), T.I(t[i]);
  T.Q();
  return 0;
}