#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 7;
const long long INF = 1e9 + 7;
string s;
long long cnt[maxn], z[maxn];
bool mrk[maxn];
vector<pair<long long, long long> > res;
int32_t main() {
  cin >> s;
  cnt[s.size()]++;
  mrk[s.size()] = true;
  long long r = -1, l = -1;
  for (long long i = 1; i < s.size(); i++) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < s.size() && s[z[i]] == s[i + z[i]]) z[i]++;
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
    if (i + z[i] == s.size()) mrk[z[i]] = true;
    cnt[z[i]]++;
  }
  for (long long i = s.size() - 1; i > -0; i--) cnt[i] += cnt[i + 1];
  for (long long i = 1; i <= s.size(); i++)
    if (mrk[i]) res.push_back({i, cnt[i]});
  cout << res.size() << endl;
  for (long long i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
}
