#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e17;
const int MAXM = 1e6 + 5;
const int MAXN = 1e6 + 4;
vector<int> z;
map<int, int> m;
vector<pair<int, int> > v;
void z_algorithm(string s) {
  int n = s.size();
  z.resize(n);
  int lft = 0, rgt = 0;
  for (int i = 1; i < n; i++) {
    if (i <= rgt) z[i] = min(rgt - i + 1, z[i - lft]);
    while (i + z[i] < n and s[z[i]] == s[i + z[i]]) z[i] += 1;
    if (i + z[i] - 1 > rgt) {
      lft = i;
      rgt = i + z[i] - 1;
    }
  }
}
int has[MAXM];
int main() {
  string s;
  cin >> s;
  int n = s.length(), i, j;
  z_algorithm(s);
  for (i = 0; i < n; i++) {
    if (!z[i]) continue;
    has[z[i]]++;
  }
  for (i = MAXM; i >= 0; i--) {
    has[i] += has[i + 1];
  }
  for (i = 0; i < n; i++) {
    if (i + 1 == n) {
      v.push_back(make_pair(i + 1, 1));
      break;
    }
    int es = s.length() - i - 1;
    if (z[es] != i + 1) continue;
    v.push_back(make_pair(i + 1, has[i + 1] + 1));
  }
  cout << (int)v.size() << endl;
  ;
  for (auto it : v) {
    cout << it.first << " " << it.second << endl;
  }
  return 0;
}
