#include <bits/stdc++.h>
using namespace std;
long long a[100005];
bool v[100005];
vector<pair<long long, long long>> p;
vector<int> z_function(string second) {
  int n = (int)second.length();
  vector<int> z(n);
  for (int 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 && second[z[i]] == second[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  p.reserve(100005);
  string second;
  cin >> second;
  vector<int> z = z_function(second);
  vector<int> z1(z);
  sort(z1.begin(), z1.end());
  long long len, n = z.size();
  for (long long i = 0; i < z.size(); i++) {
    len = z[i];
    if (len > 0 && len == z[n - len] && v[len] == 0) {
      v[len] = 1;
      long long d = z1.end() - lower_bound(z1.begin(), z1.end(), len) + 1;
      p.push_back(make_pair(len, d));
    }
  }
  sort(p.begin(), p.end());
  cout << p.size() + 1 << "\n";
  for (auto it : p) cout << it.first << " " << it.second << "\n";
  cout << n << " " << 1 << "\n";
  return 0;
}
