#include <bits/stdc++.h>
using namespace std;
char s[100005];
int n;
int d[100005];
int z[100005];
int ans[100005], asz = 0;
int main() {
  scanf("%s", s);
  n = strlen(s);
  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[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  for (int i = 0; i < n; ++i) d[z[i]]++;
  for (int i = n - 1; i >= 0; --i) d[i] += d[i + 1];
  for (int i = 1; i < n; ++i) {
    if (z[n - i] >= i) ans[asz++] = i;
  }
  cout << asz + 1 << endl;
  for (int i = 0; i < asz; ++i) printf("%d %d\n", ans[i], d[ans[i]] + 1);
  printf("%d %d\n", n, 1);
  return 0;
}
