//by xxj
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define ll long long
#define pii pair<int,int>
#define lowbit(x) x&-x
const int inf=1e9+7;
const double eps=1e-10;
const ll linf=1e18+7;
const ll hh=523;
//const int mod=;
int fail[1000007];
void buildfail(string q){
	q+='$';
	fail[0]=-1;
	int i=0,j=-1;
	while (i<q.size()-1){
		if (j==-1 || q[i]==q[j]){
			j++;
			i++;
			fail[i]=j;
		}
		else{
			j=fail[j];
		}
	}
}
string s;
int main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	cin>>s;
	buildfail(s);
	/*
	for (int i=0;i<=s.size();i++){
		cout<<fail[i]<<' '; 
	}
	puts("");
	*/
	int len=s.size()-fail[s.size()];
//	cout<<s.size()<<' '<<len<<endl;
	if (len!=s.size() && s.size()%len==0){
		if (len==1){
			printf("%d\n",s.size());
			puts("1");
		}
		else{
			int ans;
			if (s.size()/len==2){
				ans=s.size()/len+1;
				puts("2");
				printf("%d\n",ans);
			}
			else{
				ans=s.size()/len*(len-1);
				puts("2");
				printf("%d\n",ans);
			}
		}
	}
	else{
		puts("1");
		puts("1");
	}
	return 0;
}
/*
input:
ACTAAC
ACACTAAC
*/