#include <bits/stdc++.h>
using namespace std;
void mahakal() {}
vector<long long> z_algo(string str) {
  long long n = str.length();
  vector<long long> z(n, 0);
  for (long long 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 && str[z[i]] == str[i + z[i]]) z[i]++;
    if (i + z[i] - 1 > r) {
      l = i;
      r = i + z[i] - 1;
    }
  }
  return z;
}
int main() {
  mahakal(), ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  string str;
  cin >> str;
  long long n = str.length();
  vector<long long> z = z_algo(str);
  vector<long long> vec(n);
  for (long long i = 0; i < n; i++) vec[i] = z[i];
  sort(vec.begin(), vec.end());
  vector<pair<long long, long long>> ans;
  for (long long i = 0; i < n; i++) {
    if (z[n - i - 1] == i + 1) {
      long long ps =
          (vec.end() - lower_bound(vec.begin(), vec.end(), i + 1)) + 1;
      ans.push_back({i + 1, ps});
    }
  }
  ans.push_back({n, 1});
  cout << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << "\n";
  }
  return 0;
}
