#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
const int INF = 1e9 + 7;
vector<int> Z;
string T;
void zeta(string &U) {
  Z = vector<int>(T.size(), 0);
  for (int i = 1, l = 0, r = 0; i < U.size(); i++) {
    if (i <= r) Z[i] = min(Z[i - l], r - i + 1);
    for (; i + Z[i] < U.size() && U[Z[i]] == U[i + Z[i]]; Z[i]++)
      ;
    if (r < i + Z[i] - 1) l = i, r = i + Z[i] - 1;
  }
  Z[0] = T.size();
}
int cnt[N];
bool isPreff[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> T;
  zeta(T);
  int n = T.size();
  for (int i = 0; i < n; i++) {
    if (i + Z[i] == n) {
      isPreff[Z[i]] = true;
    }
    cnt[1]++;
    cnt[Z[i] + 1]--;
  }
  int sum = 0;
  vector<pair<int, int> > ans;
  for (int i = 1; i <= n; i++) {
    sum += cnt[i];
    if (!isPreff[i]) continue;
    ans.push_back({i, sum});
  }
  cout << ans.size() << '\n';
  for (pair<int, int> p : ans) {
    cout << p.first << ' ' << p.second << '\n';
  }
  return 0;
}
