#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, i, e, f, g, n, m, k, l, A[200005];
string s;
vector<long long> v;
map<long long, long long> mp;
int main() {
  cin >> s;
  for (long long i = 1, l = 0, r = 0; i < s.size(); ++i) {
    if (i <= r) A[i] = min(r - i + 1, A[i - l]);
    while (i + A[i] < s.size() && s[A[i]] == s[i + A[i]]) ++A[i];
    if (i + A[i] - 1 > r) l = i, r = i + A[i] - 1;
  }
  for (long long i = 1; i < s.size(); i++) {
    mp[A[i]]++;
  }
  for (long long i = s.size(); i >= 1; i--) {
    mp[i] += mp[i + 1];
  }
  for (long long i = s.size() - 1; i >= 1; i--) {
    if (i + A[i] == s.size()) {
      v.push_back(A[i]);
    }
  }
  cout << v.size() + 1 << endl;
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << " " << mp[v[i]] + 1 << endl;
  }
  cout << s.size() << " " << 1;
}
