#include <bits/stdc++.h>
using namespace std;
long long ans1[200009];
long long ans2[200009];
long long ans[200009];
long long p[200009];
map<long long, long long> b;
int main() {
  long long l, i, now, maxn = -2, k = 1, q, q1, l1, r;
  string s;
  cin >> s;
  l1 = s.size();
  l = r = 0;
  for (i = 1; i < l1; i++) {
    if (i > r) {
      l = r = i;
      while (r < l1 && s[r] == s[r - l]) r++;
      b[r - l]++;
      p[i] = r - l;
      r--;
    } else {
      k = i - l;
      if (p[k] < r - i + 1) {
        p[i] = p[k];
        b[p[k]]++;
      } else {
        l = i;
        while (r < l1 && s[r] == s[r - l]) r++;
        p[i] = r - l;
        b[r - l]++;
        r--;
      }
    }
  }
  for (i = l1; i >= 1; i--) {
    ans[i] = ans[i + 1] + b[i];
  }
  k = 1;
  for (i = l1 - 1; i >= 1; i--) {
    if (i + p[i] == l1) {
      ans1[k] = p[i];
      ans2[k] = ans[p[i]] + 1;
      k++;
    }
  }
  cout << k << endl;
  for (i = 1; i < k; i++) cout << ans1[i] << " " << ans2[i] << endl;
  cout << l1 << " 1";
}
