#include <bits/stdc++.h>
using namespace std;
static const int maxn = 200000 + 5;
char s[maxn];
int Z[maxn];
void Z_ALGO() {
  int len = strlen(s);
  Z[0] = len;
  int lt = 0, rt = 0;
  for (int k = 1; k < len; k++) {
    if (k > rt) {
      int n = 0;
      while (n + k < len && s[n] == s[n + k]) n++;
      Z[k] = n;
      if (n > 0) {
        lt = k;
        rt = k + n - 1;
      }
    } else {
      int p = k - lt;
      int right_part_len = rt - k + 1;
      if (Z[p] < right_part_len)
        Z[k] = Z[p];
      else {
        int i = rt + 1;
        while (i < len && s[i] == s[i - k]) i++;
        Z[k] = i - k;
        lt = k;
        rt = i - 1;
      }
    }
  }
}
int data[maxn];
int SUM[maxn];
void SOLVE() {
  int len = strlen(s);
  for (int i = 0; i < len; i++) data[Z[i]]++;
  for (int i = 1; i <= len; i++) SUM[i] = SUM[i - 1] + data[i];
}
vector<pair<int, int> > ans;
void SOLUTION_PRINT() {
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    int j = len - i - 1;
    if (Z[j] == i + 1) {
      int OCC = SUM[len] - SUM[Z[j] - 1];
      ans.push_back({i + 1, OCC});
    }
  }
  printf("%d\n", ans.size());
  for (auto it : ans) printf("%d %d\n", it.first, it.second);
}
int main() {
  scanf("%s", s);
  Z_ALGO();
  SOLVE();
  SOLUTION_PRINT();
}
