#include <bits/stdc++.h>
using namespace std;
long long int bit[1000006];
void upd(long long int n, long long int val) {
  while (n <= 1000000) {
    bit[n] += val;
    n += n & (-n);
  }
}
long long int go(long long int n) {
  long long int re = 0;
  while (n) {
    re += bit[n];
    n -= n & (-n);
  }
  return re;
}
int main() {
  long long int i, j, k, n, m, t;
  string s;
  cin >> s;
  long long int l = 0, r = 0;
  n = s.length();
  long long int z[n];
  z[0] = 0;
  for (i = 1; i < n; i++) {
    if (i > r) {
      l = r = i;
      while (r < n && s[r] == s[r - l]) {
        r += 1;
      }
      z[i] = r - l;
      r -= 1;
    } else {
      k = i - l;
      if (z[k] < r - i + 1)
        z[i] = z[k];
      else {
        l = i;
        while (r < n && s[r] == s[r - l]) {
          r += 1;
        }
        z[i] = r - l;
        r -= 1;
      }
    }
  }
  long long int ma = 0, re = 0;
  map<long long int, long long int> p;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    if (z[i] == 0) continue;
    if (p[z[i]] == 0 && z[i] == n - i) {
      v.push_back(z[i]);
      p[z[i]] = 1;
    }
    upd(z[i], 1);
  }
  sort(v.begin(), v.end());
  cout << v.size() + 1 << "\n";
  for (i = 0; i < v.size(); i++) {
    long long int now = v[i];
    cout << now << " " << go(n) - go(now - 1) + 1 << "\n";
  }
  cout << n << " " << 1 << "\n";
  return 0;
}
