#include <bits/stdc++.h>
using namespace std;
void compute_Z(string &S, vector<int> &Z) {
  int i, L = 0, R = 0;
  Z[0] = S.length();
  for (i = 1; i < S.length(); ++i) {
    if (R < i) {
      R = L = i;
      while (S[R - L] == S[R]) ++R;
      Z[i] = R - L;
      --R;
    } else {
      if (i + Z[i - L] - 1 < R)
        Z[i] = Z[i - L];
      else {
        L = i;
        while (S[R - L] == S[R]) ++R;
        Z[i] = R - L;
        --R;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string A;
  cin >> A;
  vector<int> Z(A.length());
  vector<int> F(A.length() + 1, 0);
  compute_Z(A, Z);
  for (auto v : Z) F[v]++;
  int i;
  for (i = A.length() - 1; i >= 0; --i) F[i] += F[i + 1];
  vector<pair<int, int> > out;
  for (i = A.length() - 1; i >= 0; --i) {
    if (i + Z[i] == A.length()) {
      out.push_back(make_pair(Z[i], F[Z[i]]));
    }
  }
  cout << out.size() << '\n';
  for (auto v : out) cout << v.first << " " << v.second << "\n";
  return 0;
}
