#include<stdio.h>
#include<stdbool.h>
int main()
{
int test;
int ar[]={12,6,4,3,2,1},i,j,k,s,l;
int ch,c[6];
int count=0;
char w[12];
while(test--)
{
count=0;
//printf("%s\n",w);
for(i=0;i<6;i++)
{
ch=0;
for(j=0;j<ar[i];j++)
{
s=0;l=0;
if(w[j]=='X')
{
for(k=ar[i]+j;k<12;k=k+ar[i])
{
if(w[k]=='X')
s++;
else
break;
}
l=1;
}
if(s==((12/ar[i])-1)&&l==1)
{
//printf("%d",i);
ch=1;
break;
}
}
if(ch==1)
{count++;c[i]=1;}
else
c[i]=0;
}
for(i=0;i<6;i++)
{
if(c[i]==1)
printf(" %dx%d",(12/ar
[i
]),ar
[i
]); }
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RkYm9vbC5oPgppbnQgbWFpbigpCnsKaW50IHRlc3Q7CnNjYW5mKCIlZCIsJnRlc3QpOwppbnQgYXJbXT17MTIsNiw0LDMsMiwxfSxpLGosayxzLGw7CmludCBjaCxjWzZdOwppbnQgY291bnQ9MDsKY2hhciB3WzEyXTsKd2hpbGUodGVzdC0tKQp7CmNvdW50PTA7CnNjYW5mKCIlcyIsdyk7Ci8vcHJpbnRmKCIlc1xuIix3KTsKZm9yKGk9MDtpPDY7aSsrKQp7CgljaD0wOwoJZm9yKGo9MDtqPGFyW2ldO2orKykKCXsgIAoJCXM9MDtsPTA7CgkJaWYod1tqXT09J1gnKQoJCXsKCQlmb3Ioaz1hcltpXStqO2s8MTI7az1rK2FyW2ldKQoJCXsKCQlpZih3W2tdPT0nWCcpCgkJCXMrKzsKCQllbHNlCgkJYnJlYWs7CgkJfQoJCWw9MTsKCQl9CgkJaWYocz09KCgxMi9hcltpXSktMSkmJmw9PTEpCgkJewoJCS8vcHJpbnRmKCIlZCIsaSk7CgkJY2g9MTsKCQlicmVhazsKCQl9Cgl9CglpZihjaD09MSkKCXtjb3VudCsrO2NbaV09MTt9CgllbHNlCgljW2ldPTA7Cn0KcHJpbnRmKCIlZCIsY291bnQpOwpmb3IoaT0wO2k8NjtpKyspCnsKaWYoY1tpXT09MSkKcHJpbnRmKCIgJWR4JWQiLCgxMi9hcltpXSksYXJbaV0pOwp9CnByaW50ZigiXG4iKTsKfQpyZXR1cm4gMDsKfQ==