#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
const long long MOD1 = 1e9 + 7;
const long long MOD2 = 997;
const long long p = 31;
const int INF = 2e6;
char s[MAXN];
int z[MAXN];
long long hs[MAXN][2];
long long p_pow[MAXN][2];
void z_fun(int n) {
  for (int i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) {
      z[i] = min(r - i + 1, z[i - l]);
    }
    while (i + z[i] < n && s[i + z[i]] == s[z[i]]) {
      z[i]++;
    }
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
}
void solve() {
  scanf("%s", s);
  int n = strlen(s);
  z_fun(n);
  z[0] = n;
  sort(z, z + n);
  p_pow[0][0] = p_pow[0][1] = 1;
  for (int i = 1; i < MAXN; i++) {
    p_pow[i][0] = (p_pow[i - 1][0] * p + MOD1) % MOD1;
    p_pow[i][1] = (p_pow[i - 1][1] * p + MOD2) % MOD2;
  }
  for (int i = 0; i < MAXN; i++) {
    hs[i][0] = (p_pow[i][0] * s[i] + MOD1) % MOD1;
    hs[i][1] = (p_pow[i][1] * s[i] + MOD2) % MOD2;
    if (i) {
      hs[i][0] = (hs[i][0] + hs[i - 1][0] + MOD1) % MOD1;
      hs[i][1] = (hs[i][1] + hs[i - 1][1] + MOD2) % MOD2;
    }
  }
  vector<pair<int, int> > res;
  long long m1, m2;
  long long hs1, hs2;
  z[n] = INF;
  int ans;
  for (int i = 0; i < n; i++) {
    hs1 = hs[i][0];
    hs2 = hs[n - 1][0];
    if (n - 2 - i >= 0) {
      hs2 = (hs2 - hs[n - 2 - i][0] + MOD1) % MOD1;
    }
    m1 = (hs1 * p_pow[MAXN - 1 - i][0] + MOD1) % MOD1;
    m2 = (hs2 * p_pow[MAXN - n][0] + MOD1) % MOD1;
    if (m1 != m2) continue;
    hs1 = hs[i][1];
    hs2 = hs[n - 1][1];
    if (n - 2 - i >= 0) {
      hs2 = (hs2 - hs[n - 2 - i][1] + MOD2) % MOD2;
    }
    m1 = (hs1 * p_pow[MAXN - 1 - i][1] + MOD2) % MOD2;
    m2 = (hs2 * p_pow[MAXN - n][1] + MOD2) % MOD2;
    if (m1 != m2) continue;
    int j = lower_bound(z, z + n + 1, i + 1) - z;
    ans = n - j;
    res.push_back(make_pair(i + 1, ans));
  }
  int sz = res.size();
  printf("%d\n", sz);
  for (int i = 0; i < sz; i++) {
    printf("%d %d\n", res[i].first, res[i].second);
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
