#include <bits/stdc++.h>
using namespace std;
string s;
long long z[100007];
long long grandChildrenCounter[100007];
void computeZ() {
  int l = 0, r = 0;
  z[0] = ((int)(s).size());
  for (int i = 1; i <= ((int)(s).size()) - 1; i++) {
    if (i > r) {
      l = r = i;
      while (r < ((int)(s).size()) && s[r] == s[r - l]) r++;
      r--;
      z[i] = r - l + 1;
    } else {
      if (z[i - l] < r - i + 1)
        z[i] = z[i - l];
      else {
        l = i;
        while (r < ((int)(s).size()) && s[r] == s[r - l]) r++;
        r--;
        z[i] = r - l + 1;
      }
    }
  }
}
int main() {
  cin >> s;
  computeZ();
  vector<int> vi;
  for (int i = ((int)(s).size()) - 1; i >= 0; i--) {
    if (i + z[i] == ((int)(s).size())) vi.push_back(z[i]);
    grandChildrenCounter[z[i]]++;
  }
  for (int i = ((int)(s).size()) - 1; i >= 0; i--) {
    grandChildrenCounter[i] += grandChildrenCounter[i + 1];
  }
  sort((vi).begin(), (vi).end());
  cout << ((int)(vi).size()) << endl;
  for (int i = 0; i < ((int)(vi).size()); i++) {
    cout << vi[i] << " " << grandChildrenCounter[vi[i]] << endl;
  }
  return 0;
}
