#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
string S;
int N;
int Z[MAXN];
int len[MAXN];
void Zalg() {
  int L = 0, R = 0;
  for (int i = 1; i < N; i++) {
    if (i > R) {
      L = R = i;
      while (R < N && S[R] == S[R - L]) R++;
      Z[i] = R - L;
      R--;
    } else {
      int j = i - L;
      if (Z[j] < R - i + 1)
        Z[i] = Z[j];
      else {
        L = i;
        while (R < N && S[R] == S[R - L]) R++;
        Z[i] = R - L;
        R--;
      }
    }
  }
}
int main() {
  cin >> S;
  N = S.size();
  Z[0] = N;
  Zalg();
  memcpy(len, Z, sizeof(len));
  sort(len, len + N);
  int total = 0;
  for (int i = 1; i <= N; i++)
    if (Z[N - i] == i) total++;
  cout << total << "\n";
  int idx = 0;
  for (int i = 1; i <= N; i++) {
    if (Z[N - i] != i) continue;
    while (idx < N && len[idx] < i) idx++;
    cout << i << " " << N - idx << "\n";
  }
  return 0;
}
