#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
char s[maxn];
int leng = 0;
int f[maxn];
void Zalgo(char *ss) {
  int len = strlen(ss);
  f[0] = len;
  int l = -1, r = -1;
  for (int pos = 1; pos < len; pos++) {
    if (r != -1 && pos <= r) {
      int kgm = pos - l;
      f[pos] = min(r - pos + 1, f[kgm]);
      for (int i = pos + f[pos]; i < len; i++) {
        if (ss[i] == ss[i - pos])
          f[pos]++;
        else
          break;
      }
    } else {
      for (int i = pos; i < len; i++) {
        if (ss[i] == ss[i - pos])
          f[pos]++;
        else
          break;
      }
    }
    if (f[pos] != 0 && r < pos + f[pos] - 1) l = pos, r = pos + f[pos] - 1;
  }
}
int hav[maxn], sum[maxn];
vector<pair<int, int> > ans;
int main() {
  scanf("%s", s);
  leng = strlen(s);
  Zalgo(s);
  for (int i = 0; i < leng; i++) hav[f[i]]++;
  sum[leng + 1] = 0;
  for (int i = leng; i >= 0; i--) sum[i] = sum[i + 1] + hav[i];
  ans.clear();
  for (int i = leng - 1; i >= 0; i--) {
    if (f[i] == leng - i) ans.push_back(make_pair(leng - i, sum[leng - i]));
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < (int)ans.size(); i++) {
    printf("%d %d\n", ans[i].first, ans[i].second);
  }
  return 0;
}
