#include <bits/stdc++.h>
using namespace std;
int const N = 5e5 + 41;
int l[N];
string str;
int n;
vector<int> getdivisors(int n) {
  vector<int> res;
  res.push_back(1);
  while (n > 1) {
    int m = (int)(res.size());
    for (int j = m - 1; j >= 0; --j) res.push_back(res[j] * l[n]);
    n /= l[n];
  }
  return res;
}
void init() {
  for (int i = 2; i < N; ++i) {
    if (!l[i]) {
      for (int j = i; j < N; j += i) {
        if (l[j] == 0 || l[j] > i) l[j] = i;
      }
    }
  }
}
namespace Hash {
static int const K = 3;
int h[K][N], d[K][N];
static int const P[K] = {63, 61, 59};
static int const MOD[K] = {1000001531, 1000002187, 1000002193};
int mul(int a, int b, int mod) { return (long long)a * b % mod; }
int sum(int a, int b, int mod) {
  a %= mod;
  while (a < 0) a += mod;
  b %= mod;
  while (b < 0) b += mod;
  return (a + b) % mod;
}
void build() {
  for (int i = 0; i < K; ++i) d[i][0] = 1;
  for (int i = 1; i < N; ++i)
    for (int j = 0; j < K; ++j) {
      d[j][i] = mul(d[j][i - 1], P[j], MOD[j]);
    }
  for (int i = 0; i < (int)(str.size()); ++i)
    for (int j = 0; j < K; ++j) {
      h[j][i] = mul((i ? h[j][i - 1] : 0), P[j], MOD[j]);
      h[j][i] = sum(h[j][i], (str[i] - 'a' + 1), MOD[j]);
    }
}
vector<int> gethash(int l, int r) {
  vector<int> res;
  for (int i = 0; i < K; ++i) {
    int x = h[i][r];
    if (l) x = sum(x, -mul(h[i][l - 1], d[i][r - l + 1], MOD[i]), MOD[i]);
    res.push_back(x);
  }
  return res;
}
};  // namespace Hash
bool checkone() {
  for (int i = 1; i < n; ++i) {
    if (n % i == 0) {
      vector<int> h = Hash::gethash(0, i - 1);
      bool ok = true;
      for (int j = 0; j < n; j += i) {
        vector<int> h0 = Hash::gethash(j, j + i - 1);
        if (h0 != h) {
          ok = false;
          break;
        }
      }
      if (ok) return false;
    }
  }
  return true;
}
bool checkall() {
  for (int i = 0; i < (int)(str.size()); ++i)
    if (str[i] != str[0]) return false;
  return true;
}
int p[N], s[N];
void build() {
  for (int i = 0; i < n + 1; ++i) p[i] = s[i] = 1;
  for (int i = 1; i < n + 1; ++i) {
    vector<int> h = Hash::gethash(0, i - 1);
    for (int j = i + i; j <= n; j += i) {
      vector<int> h0 = Hash::gethash(j - i, j - 1);
      if (h != h0) break;
      p[j - 1] = 0;
    }
  }
  for (int i = 1; i < n + 1; ++i) {
    vector<int> h = Hash::gethash(n - i, n - 1);
    for (int j = i + i; j <= n; j += i) {
      vector<int> h0 = Hash::gethash(n - j, n - j + i - 1);
      if (h != h0) break;
      s[n - j] = 0;
    }
  }
}
int checktwo() {
  int res = 0;
  for (int i = 0; i < n - 1; ++i) {
    res += (p[i] && s[i + 1]);
  }
  return res;
}
void solve() {
  n = (int)(str.size());
  Hash::build();
  if (checkall()) {
    cout << n << " " << 1 << endl;
    return;
  }
  if (checkone()) {
    cout << 1 << " " << 1 << endl;
    return;
  }
  build();
  if (checktwo() > 0) {
    cout << 2 << " " << checktwo() << endl;
    return;
  }
  cout << 3 << " " << 1 << endl;
}
int main() {
  init();
  cin >> str;
  solve();
  return 0;
}
