#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, z[N], cnt[N], L, R;
bool mark[N];
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  n = s.size();
  mark[n] = 1;
  cnt[n]++;
  for (int i = 1; i < n; i++) {
    if (i > R) {
      R = L = i;
      while (R < n && s[R - L] == s[R]) R++;
      z[i] = R - L;
      R--;
    } else {
      int k = i - L;
      if (z[k] < R - i + 1)
        z[i] = z[k];
      else {
        L = i;
        while (R < n && s[R - L] == s[R]) R++;
        z[i] = R - L;
        R--;
      }
    }
    if (i + z[i] == n) mark[z[i]] = 1;
    cnt[z[i]]++;
  }
  vector<int> vec;
  for (int i = n; i; --i) {
    cnt[i] += cnt[i + 1];
    if (mark[i]) vec.push_back(i);
  }
  reverse(vec.begin(), vec.end());
  cout << vec.size() << "\n";
  for (auto i : vec) cout << i << " " << cnt[i] << "\n";
  return 0;
}
