#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
string s;
int n;
int cnt[N];
vector<pair<int, int> > ans;
vector<int> zf() {
  vector<int> z(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;
  }
  return z;
}
int main() {
  cin >> s;
  n = s.size();
  vector<int> z = zf();
  if (s.size() == 1) {
    cout << "1\n1 1" << endl;
    return 0;
  }
  for (int i = 1; i < n; ++i) {
    if (z[i] > 0) ++cnt[z[i]];
  }
  for (int i = 1; i <= n; ++i) cnt[i] += cnt[i - 1];
  for (int i = n - 1, k = 1; i >= 0; --i, ++k) {
    if ((i + z[i] - 1) >= (n - 1)) {
      ans.push_back({k, cnt[n] - cnt[k - 1] + 1});
    }
  }
  printf("%d\n", ans.size() + 1);
  for (int i = 0; i < ans.size(); ++i)
    printf("%d %d\n", ans[i].first, ans[i].second);
  printf("%d 1\n", n);
}
