#include <bits/stdc++.h>
static const int MAXN = 5e5 + 4;
static const int HBASE1 = 983;
static const long long HMOD1 = 998244353;
static const int HBASE2 = 418;
static const long long HMOD2 = 1e9 + 7;
long long HBASE1_POW[MAXN], HBASE2_POW[MAXN];
int n;
char s[MAXN];
std::pair<long long, long long> h[MAXN];
inline std::pair<long long, long long> get_hash(int l, int r) {
  return std::pair<long long, long long>(
      (h[l].first - h[r + 1].first + HMOD1) * HBASE1_POW[n - r] % HMOD1,
      (h[l].second - h[r + 1].second + HMOD2) * HBASE2_POW[n - r] % HMOD2);
}
int main() {
  scanf("%s", s);
  n = strlen(s);
  HBASE1_POW[0] = HBASE2_POW[0] = 1;
  for (int i = 1; i <= n; ++i)
    HBASE1_POW[i] = HBASE1_POW[i - 1] * HBASE1 % HMOD1;
  for (int i = 1; i <= n; ++i)
    HBASE2_POW[i] = HBASE2_POW[i - 1] * HBASE2 % HMOD2;
  h[0] = std::pair<long long, long long>(0, 0);
  for (int i = 0; i < n; ++i) {
    h[i + 1] = std::pair<long long, long long>(
        (h[i].first + HBASE1_POW[i] * s[i]) % HMOD1,
        (h[i].second + HBASE2_POW[i] * s[i]) % HMOD2);
  }
  int period = -1;
  for (int i = 1; i <= n; ++i)
    if (n % i == 0) {
      bool valid = true;
      std::pair<long long, long long> first = get_hash(0, i - 1);
      for (int j = i; j < n; j += i)
        if (get_hash(j, j + i - 1) != first) {
          valid = false;
          break;
        }
      if (valid) {
        period = i;
        break;
      }
    }
  if (period == 1) {
    printf("%d\n1\n", n);
  } else if (period == n) {
    printf("1\n1\n");
  } else {
    if (n / period == 2)
      printf("2\n%d\n", n - 1);
    else
      printf("2\n%d\n", n - n / period);
  }
  return 0;
}
