#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 1e18;
const double EPS = 1e-9;
template <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << '(' << p.f << ", " << p.s << ')';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  long long l = v.size();
  for (long long i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
vector<long long> z_function(string s) {
  long long n = s.length();
  vector<long long> z(n);
  for (long long 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;
}
void solve() {
  string s;
  cin >> s;
  long long n = s.size();
  vector<long long> z = z_function(s);
  vector<long long> count(n + 1, 0);
  for (int i = 1; i < n; i++) {
    count[z[i]]++;
  }
  for (int i = n - 1; i >= 0; i--) {
    count[i] += count[i + 1];
  }
  long long num = 0;
  vector<pair<long long, long long> > ans;
  for (int i = n - 1; i >= 0; i--) {
    if (z[i] == n - i) {
      num++;
      ans.push_back({z[i], count[z[i]] + 1});
    }
  }
  num++;
  ans.push_back({n, 1});
  cout << num << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout.precision(50);
  solve();
}
