#include <bits/stdc++.h>
using namespace std;
string s;
char buf[500010];
int fail[500010];
int n;
void getfail(string &s) {
  fail[0] = -1;
  int j = -1;
  for (int i = 1; i <= n; i++) {
    while (~j && s[j] != s[i - 1]) j = fail[j];
    fail[i] = ++j;
  }
}
int main() {
  scanf("%s", buf), s = buf;
  n = s.length();
  getfail(s);
  int len = n % (n - fail[n]) == 0 && (n - fail[n] <= n / 2) ? n - fail[n] : -1;
  if (len == -1) {
    printf("1\n1\n");
    return 0;
  }
  if (len == 1) {
    printf("%d\n1\n", n);
    return 0;
  }
  printf("2\n");
  int ans = n - 1 - (len - 1) + 2 - (n / len == 2 ? 1 : 0);
  printf("%d\n", ans);
  return 0;
}
