type int = longint;
var HashT,pow:array[0..300] of int64;
s:string;
i,l:byte;
const md = trunc(1e9 + 7);
const base = 37;
function GetHash(i,j:int):int;
begin
exit((HashT[j] - HashT[i-1]*pow[j-i+1] + md*md) mod md);
end;
function check(r:int):boolean;
var i,p:int;
begin
p:=GetHash(1,r);
i:=r;
while (i <= l) do
begin
if GetHash(i-r+1,i) <> p then
exit(false);
inc(i,r);
end;
exit(true);
end;
begin
readln(s);
l:=length(s);
pow[0]:=1;
for i:=1 to l do
pow[i]:= (pow[i-1]*base) mod md;
for i:=1 to l do
HashT[i]:=(HashT[i-1]*base + ord(s[i]) - 96) mod md;
for i:=1 to l do
if l mod i = 0 then
if check(i) then
begin
writeln(i,' ',l div i);
exit;
end;
end.