#include <bits/stdc++.h>
using namespace std;
inline bool compare(long long int i, long long int j) { return i < j; }
const long long int maxN = 1e5 + 10;
const long long int maxB = 320;
const long long int INF = 1e14;
string s;
long long int z[maxN + 10];
vector<pair<long long int, long long int> > ans;
vector<long long int> match_len;
void create_z_array() {
  long long int i, x = 0, y = 0, n = s.length();
  for (i = 1; i < n; i++) {
    z[i] = max(0LL, min(z[i - x], y - i + 1));
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) {
      x = i;
      y = i + z[i];
      z[i]++;
    }
  }
  return;
}
void match() {
  create_z_array();
  ans.clear();
  match_len.clear();
  long long int n = s.length(), i;
  for (i = 1; i < n; i++) {
    match_len.push_back(z[i]);
    if (z[i] == n - i) {
      ans.push_back(make_pair(z[i], 0LL));
    }
  }
  sort(match_len.begin(), match_len.end());
  for (i = 0; i < ans.size(); i++) {
    ans[i].second =
        match_len.end() -
        lower_bound(match_len.begin(), match_len.end(), ans[i].first) + 1;
  }
  sort(ans.begin(), ans.end());
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int number_of_test_case = 1, test_case;
  for (test_case = 1; test_case <= number_of_test_case; test_case++) {
    long long int i, j, k, m, n, query, q;
    cin >> s;
    match();
    cout << ans.size() + 1 << "\n";
    for (i = 0; i < ans.size(); i++) {
      cout << ans[i].first << " " << ans[i].second << "\n";
    }
    cout << s.length() << " 1\n";
  }
  return 0;
}
