#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 100, N = 2e5 + 5;
const long long INF = 1e18 + 100, MOD = 1e9 + 7;
long long powmod(long long a, long long b, long long m = MOD) {
  long long r = 1;
  while (b > 0) {
    if (b & 1) r = r * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return r;
}
long long power(long long a, long long b) {
  long long r = 1;
  while (b > 0) {
    if (b & 1) r = r * a;
    a = a * a;
    b >>= 1;
  }
  return r;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long inv(long long a, long long m = MOD) { return powmod(a, m - 2, m); }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int mp[N];
vector<int> z_func(string s) {
  int n = (int)s.size();
  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 && s[z[i]] == s[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),
      cout << setprecision(10) << fixed;
  ;
  string s;
  vector<pair<int, int> > ans;
  cin >> s;
  int n = (int)s.size();
  vector<int> z = z_func(s);
  for (auto x : z) {
    mp[x]++;
  }
  for (int i = n - 2; i >= 0; --i) {
    mp[i] += mp[i + 1];
  }
  for (int i = n - 1; i >= 1; --i) {
    if (z[i] == n - i) {
      ans.push_back({z[i], mp[z[i]] + 1});
    }
  }
  ans.push_back({n, 1});
  sort(ans.begin(), ans.end());
  cout << (int)ans.size() << "\n";
  for (auto x : ans) cout << x.first << " " << x.second << "\n";
}
