#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 45;
const int inf = 0x3f3f3f3f;
void ttf() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int z[N], p[N];
void solve() {
  string s;
  cin >> s;
  int n = (int)s.length();
  z[0] = n;
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  for (int i = 0; i < n; ++i) {
    p[z[i]]++;
  }
  for (int i = n - 1; i >= 1; --i) {
    p[i] += p[i + 1];
  }
  vector<pair<int, int> > v;
  for (int i = 0; i < n; ++i) {
    if (z[i] + i == n) {
      v.push_back(make_pair(z[i], p[z[i]]));
    }
  }
  cout << ((int)(v.size())) << endl;
  reverse(v.begin(), v.end());
  for (int i = 0; i < ((int)(v.size())); ++i)
    cout << v[i].first << ' ' << v[i].second << endl;
}
int main() {
  ttf();
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
