#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 123;
int n, k;
int z[N];
string s;
void solve() {
  cin >> s;
  n = s.size();
  for (int i = 0; i <= n; ++i) z[i] = 0;
  z[0] = n;
  vector<int> len;
  len.push_back(z[0]);
  multiset<int> m;
  m.insert(z[0]);
  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[z[i] + i]) z[i]++;
    if (i + z[i] - 1 > r) {
      l = i, r = i + z[i] - 1;
    }
    if (i + z[i] == n) {
      len.push_back(z[i]);
    }
    if (z[i]) {
      m.insert(z[i]);
    }
  }
  cout << len.size() << "\n";
  ;
  for (int i = len.size() - 1; i >= 0; --i) {
    cout << len[i] << ' ';
    int ans = 0;
    while (m.size() && *m.begin() < len[i]) {
      m.erase(m.begin());
    }
    ans += m.size();
    cout << ans << "\n";
    ;
  }
}
int main() {
  int q = 1, i = 0;
  while (q--) {
    solve();
  }
  return 0;
}
