#include <bits/stdc++.h>
using namespace std;
int n;
char s[100000 + 1];
int z[100000 + 1];
void z_algorithm() {
  z[0] = 0;
  int j = 0, a = 0;
  for (int i = 1; i < n; i++) {
    if (i + z[i - a] < a + z[a])
      z[i] = z[i - a];
    else {
      j = max(a + z[a] - i, 0);
      while (i + j < n && s[i + j] == s[j]) j++;
      z[a = i] = j;
    }
  }
}
int ans[100000 + 1];
int main() {
  gets(s);
  n = strlen(s);
  z_algorithm();
  z[0] = n;
  for (int i = 0; i < n; i++) {
    ans[z[i]]++;
  }
  for (int i = n - 1; i >= 0; i--) {
    ans[i] += ans[i + 1];
  }
  int m = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (i + z[i] == n) {
      m++;
    }
  }
  printf("%d\n", m);
  for (int i = n - 1; i >= 0; i--) {
    if (i + z[i] == n) {
      printf("%d %d\n", z[i], ans[z[i]]);
    }
  }
}
