#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long mx = 5e5 + 5;
const long long inf = 1e18;
void find_z(string &s, int n, vector<int> &z) {
  z[0] = 0;
  int l = 0, r = 0;
  for (int i = 1; i < n; ++i) {
    if (i > r) {
      l = r = i;
      while (r < n && s[r - l] == s[r]) ++r;
      z[i] = r - l;
      --r;
    } else if (i + z[i - l] - 1 < r) {
      z[i] = z[i - l];
    } else {
      l = i;
      while (r < n && s[r - l] == s[r]) ++r;
      z[i] = r - l;
      --r;
    }
  }
}
void input() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  int n = s.length();
  vector<int> z(n);
  find_z(s, n, z);
  vector<int> occ(n, 0);
  for (int i = 1; i < n; ++i) {
    occ[z[i]]++;
  }
  for (int i = n - 2; i >= 1; --i) occ[i] += occ[i + 1];
  vector<pair<int, int> > ans;
  for (int i = n - 1; i >= 1; --i) {
    if (z[i] == n - i) ans.push_back({n - i, occ[n - i]});
  }
  cout << (int)ans.size() + 1 << "\n";
  for (auto &it : ans) cout << it.first << " " << it.second + 1 << "\n";
  cout << n << " " << 1 << "\n";
}
int main() {
  input();
  return 0;
}
