#include <bits/stdc++.h>
inline int getint() {
  int x = 0, p = 1;
  char c = getchar();
  while (c <= 32) c = getchar();
  if (c == 45) p = -p, c = getchar();
  while (c > 32) x = x * 10 + c - 48, c = getchar();
  return x * p;
}
using namespace std;
const int N = 5e5 + 10;
int n, pre[N];
char s[N];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  pre[1] = 0;
  for (int i = 2, j = 0; i <= n; i++) {
    while (j > 0 && s[j + 1] != s[i]) j = pre[j];
    if (s[j + 1] == s[i]) j++;
    pre[i] = j;
  }
  int len = n - pre[n];
  if (n % len != 0 || len == n) {
    printf("%d\n%d\n", 1, 1);
    return 0;
  }
  int c = n / len;
  if (c == n) {
    printf("%d\n%d\n", n, 1);
    return 0;
  }
  if (c == 2) {
    printf("%d\n%d\n", 2, n - 1);
    return 0;
  }
  printf("%d\n%d\n", 2, c * (len - 1));
  return 0;
}
